C3Fire

Difference between revisions of "C3Fire:Doc/System/System Load"

From C3LearningLabs
(Created page with "{{MenuHeadC3Fire}} {{DISPLAYTITLE:System Load}} {{TOCright}} = System Load = The following information can be displayed in the system load panel.<br> All information is saved...")
 
 
Line 1: Line 1:
{{MenuHeadC3Fire}} {{DISPLAYTITLE:System Load}}
+
{{DISPLAYTITLE:System Load}}
{{TOCright}}
+
 
 
= System Load =
 
= System Load =
  

Latest revision as of 20:27, 21 July 2021


System Load

The following information can be displayed in the system load panel.
All information is saved in the system information logfile. It is possible to select if each information should be visible in the system load panel.

PingTime

The time it takes for a client to answer a ping message send by the server. The time is defied in milliseconds.

MessagesCountSend

The number of messages sent to the computer.

MessagesCountReceive

The number of messages received from the computer.

SendQueueSize

The number of messages in send queue.

ReceiveQueueSize

The number of messages in receive queue.

TimeBetweenStep

The time it takes for the computer to perform one simulation step. The value is in milliseconds and a low value is good.

osProcessCpuLoad

System information about the process CPU load.

osProcessCpuTime

System information about the process CPU time.

osSystemCpuLoad

System information about the system CPU load.

osCommittedVirtualMemorySize

System information about the usage of virtual memory.

osFreeSwapSpaceSize

System information about the free swap memory.

osSystemLoadAverage

System information about the average system load.


At the manager computer it is recommended to show the following information:

  • PingTime: The time it takes for a client to answer a ping message send by the server.
  • osSystemCpuLoad: System information about the system CPU load.
  • osProcessCpuLoad: System information about the process CPU load.
  • TimeBetweenStep: The time it takes for the computer to perform one simulation step. Low value is good.
  • ReceiveQueueSize: The number of messages in receive queue.


At the player computers it is recommended to show the following information:

  • osSystemCpuLoad: System information about the system CPU load.
  • osProcessCpuLoad: System information about the process CPU load.
  • TimeBetweenStep: The time it takes for the computer to perform one simulation step. Low value is good.
  • ReceiveQueueSize: The number of messages in receive queue.


Example on System load Panels


C3fire-doc-sys-systemload-m12.png

        

C3fire-doc-sys-systemload-m5.png

        

System Load Manager 12 rows

System Load Manager 5 rows


C3fire-doc-sys-systemload-p9.png

        

C3fire-doc-sys-systemload-p4.png

System Load Player 9 rows

System Load Player 4 rows


Configurations for creating the example system load panels are viewed below.
The configuration is defined by the UI Main Layout and Panel UI Layout.


System Load Logfile

The system load are written in the InfoLog.xml file.
For the server computer the info log file is located in folder: .../C3System/C3Fire/Server/SystemLogs/
For the manager and player computers the info log file is located in folder: .../C3System/C3Fire/Client/SystemLogs/

Logfile Structure

A system log event is written every WriteSystemLoadInfoStepLength second, defined in the configuration. See below.

SystemLoad:20180124-214456 
MessagesCountSend: Mg=6 X=3 
MessagesCountReceive: Mg=1 X=1 
PingTime: Mg=77 X=98 
SendQueueSize: Se=0 Mg=0 X=0 
ReceiveQueueSize: Se=0 Mg=2 X=1 
TimeBetweenStep: Se=201 Mg=276 X=272 
osProcessCpuLoad: Se=5.850093884553095E-4 Mg=0.04493126238556117 X=0.03717874190927041 
osProcessCpuTime: Se=4703125000 Mg=21687500000 X=18921875000 
osSystemCpuLoad: Se=0.1542614404061553 Mg=0.15461187416576438 X=0.15569503131464768 
osCommittedVirtualMemorySize: Se=1215901696 Mg=1241403392 X=1236606976 
osFreeSwapSpaceSize: Se=1249189888 Mg=1247985664 X=1247985664 
osSystemLoadAverage: Se=-1.0 Mg=-1.0 X=-1.0

The system load event start with SystemLoad:20180124-213028
The numbers are a time stamp: YYYYMMDD-hhmmss

After that comes all values, example TimeBetweenStep: Se=202 Mg=297 X=275
Se = Server computer
Mg = Manager computer
X = Player X computer


Configuration

The system load measurements are activated in the server and client configuration.

Server Configuration

The write system load configuration for the server is defined in the <InfoLog> element in the server configuration xml file.
...C3Systems/C3Fire/Server/C3FireServerConfig.xml

Write System Load Parameters

Parameters

Description

WriteSystemLoadInfo

True if the server should monitor the system Load.
Possible values: "True", "False".

WriteSystemLoadInfoStepLength

Time between measurements written to the system load log.
The value is defined in seconds.
Value example = "10"


Xml definition:

<C3ServerConfig>
  ...
 <InfoLog
  Active          = "True"
  PathAndFileName = "InfoClient.log"
  Level           = "All" 
  WriteSystemLoadInfo   = "True"
  WriteSystemLoadInfoStepLength = "10"  />
...
</C3ServerConfig>


Client Configuration

The write system load configuration for the clients are defined in the <InfoLog> element in the client configuration xml file.
...C3Systems/C3Fire/Client/C3FireClientConfig.xml

Write System Load Parameters

Parameters

Description

WriteSystemLoadInfo

True if the server should monitor the system Load.
Possible values: "True", "False".

WriteSystemLoadInfoStepLength

Time between measurements written to the system load log.
The value is defined in seconds.
Value example = "10"


Xml definition:

<C3ClientConfig>
  ...
 <InfoLog
  Active          = "True"
  PathAndFileName = "InfoClient.log"
  Level           = "All" 
  WriteSystemLoadInfo   = "True"
  WriteSystemLoadInfoStepLength = "10"  />
...
</C3ClientConfig>


UI Configuration

The UI configuration for the System Load Panel is defined in the session configuration xml file.
The UI layout is defined in two configuration elements UI Main Layout and Panel UI Layout.

  • UI Main Layout: Main ui layout that defines where System Load Panel should be in the main Window.
  • Panel UI Layout: Defines what should be visible inside the System Load Panel.


UI Main Layout (Top Panel)

The main ui layout is the layout that defines where all panels should be in top panel in the main Window. For more information see UI Main Layout.

If config include files are used then this configuration is in the file xxx-UIMain.coni

The Manager's main layout configuration is defined in the <SessionControlLayout> element inside the <ManagerConfig> element.
The players' main layout configuration is defined a the <Layout> element inside the <UserInterfaceLayout> element.

The System Load configuration is located in a <Object> element with the ID Name = "SystemLoad" inside the layout definition.

The System Load configuration contain the following parameters:

SystemLoad Panel Parameters

Parameters

Description

Name

The UI object identification name should be "SystemLoad".

BorderVisible

If a border should be displayed around the panel.

Possible values are "True" and "False".

Pos

The position of the panel.
The value is defined in pixels "x,y", "horizontal position,vertical position".
The zero position 0,0 is at top left corner of the window.

Value example = "5,26"

Size

The size of the panel.

The value is defined in pixels "width,height", "size-x,size-y", "horizontal size, vertical size"

Value example = "280,170"

UILayout

The ID name for the UI layout that should define the layuot of this panels components.
The UI layout should be defined in a <UILayout> element inside the <UserInterfaceGlobal> element in the session configuration.

Value example = "SystemLoadManager", "SystemLoadPlayer"

Visible

If the panel should be visiple.

Possible values are "True" and "False".


Good Size Managers

12 rows: windows10 "300,250"
5 rows: windows10 "300,136"

Good Size Players

9 rows: windows10: "200,181"
4 rows: windows10: "200x98"
3 rows: windows10: "200x82"

System Load Manager 12 rows main UI layout configuration example:

<ManagerConfig
    WindowSize = "1300,895" >

    <SessionControlLayout>
...
      <Object
        Name = "SystemLoad"
        BorderVisible = "True"
        Pos = "5,580"
        Size = "300,250"
        UILayout = "SystemLoadManager"
        Visible = "True" />
...
    </SessionControlLayout>

  </ManagerConfig>


System Load Manager 5 rows main UI layout configuration example:

<ManagerConfig
    WindowSize = "1300,136" >

    <SessionControlLayout>
...
      <Object
        Name = "SystemLoad"
        BorderVisible = "True"
        Pos = "5,580"
        Size = "300,250"
        UILayout = "SystemLoadManager"
        Visible = "True" />
...
    </SessionControlLayout>

  </ManagerConfig>


System Load Player 9 rows main UI layout configuration example:

  <UserInterfaceLayout>

    <Layout
      Name = "Ground Chief" >
...
      <Object
        Name = "SystemLoad"
        BorderVisible = "True"
        Pos = "5,545"
        Size = "200,185"
        UILayout = "SystemLoadPlayer"
        Visible = "True" />
...
    </Layout>

  </UserInterfaceLayout>


System Load Player 4 rows main UI layout configuration example:

  <UserInterfaceLayout>

    <Layout
      Name = "Ground Chief" >
...
      <Object
        Name = "SystemLoad"
        BorderVisible = "True"
        Pos = "5,545"
        Size = "200,98"
        UILayout = "SystemLoadPlayerSmall"
        Visible = "True" />
...
    </Layout>

  </UserInterfaceLayout>


Panel UI Layout

The Panel UI Layou is the layout that defines what should be visible inside the System Load panel.
The Panel UI Layout configuration is defined in an <UILayout> element inside the <UserInterfaceGlobal> element.
The <UILayout> element should have the Name defined in the Main UI Layout for the manager and each player


The System Load configuration contain the following parameters:

UIPanel

Parameters

Description

Name

The UIPanel identification name should be "TableHead".

BorderText

This parameter is not used.
The border text are defined with the parameter in the language ... configuration file C3FireClientLanguageConfig2.xml.

BorderVisible

This parameter is not used.
Is defined in the Main UI layout for the System Load panel.

ColumnAlignment

This parameter is not used.

LayoutType

This parameter is not used.
It always is a table.

Pos

This parameter is not used.

Size

This parameter is not used.
Is set automatically depending on the size of the tabe.

UIObject

Parameters

Description

Module

This parameter is not used.

Name

The UI object identification name should be one of the following Computer, PingTime, MessagesCountSend, MessagesCountReceive, SendQueueSize ReceiveQueueSize, TimeBetweenStep, osProcessCpuLoad, osProcessCpuTime, osSystemCpuLoad, osCommittedVirtualMemorySize, osFreeSwapSpaceSize, osSystemLoadAverage.

Pos

The row in the table.
The value is defined by a number 1 to 12.

Value example = "5"

Size

This parameter is not used.

Type

The information type. Can be Label or Info.
Should be "Label" for the Computer and Info for all other IUOjects in the System Load panel.
See example below.

Visible

If the info row should be visible.
Possible values are "True" and "False".


Download example configuration file: SystemLoad.txt

System Load Manager 12 rows panel UI layout configuration example:

 <UserInterfaceGlobal>
    <UILayouts>
...
      <UILayout
        Name = "SystemLoadManager12" >

        <UIPanel
          Name = "TableHead"
          BorderText = "System Load"
          BorderVisible = "True"
          ColumnAlignment = "False"
          LayoutType = "Table"
          Pos = "0,5"
          Size = "" >

          <UIObject
            Module = ""
            Name = "Computer"
            Pos = "1"
            Size = ""
            Type = "Label"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "PingTime"
            Pos = "2"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "ReceiveQueueSize"
            Pos = "3"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "SendQueueSize"
            Pos = "4"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "MessagesCountReceive"
            Pos = "5"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "MessagesCountSend"
            Pos = "6"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "TimeBetweenStep"
            Pos = "7"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuLoad"
            Pos = "8"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuTime"
            Pos = "10"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osSystemCpuLoad"
            Pos = "9"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osCommittedVirtualMemorySize"
            Pos = "11"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osFreeSwapSpaceSize"
            Pos = "12"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osSystemLoadAverage"
            Pos = "13"
            Size = ""
            Type = "Info"
            Visible = "True" />

        </UIPanel>

      </UILayout>     
...  
    </UILayouts>
  </UserInterfaceGlobal>


System Load Manager 5 rows panel UI layout configuration example:

 <UserInterfaceGlobal>
    <UILayouts>
...
       <UILayout
        Name = "SystemLoadManager5" >

        <UIPanel
          Name = "TableHead"
          BorderText = "System Load"
          BorderVisible = "True"
          ColumnAlignment = "False"
          LayoutType = "Table"
          Pos = "0,5"
          Size = "" >

          <UIObject
            Module = ""
            Name = "Computer"
            Pos = "1"
            Size = ""
            Type = "Label"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osSystemCpuLoad"
            Pos = "2"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuLoad"
            Pos = "3"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "PingTime"
            Pos = "4"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "ReceiveQueueSize"
            Pos = "5"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "TimeBetweenStep"
            Pos = "6"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "SendQueueSize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountReceive"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountSend"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osProcessCpuTime"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osCommittedVirtualMemorySize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osFreeSwapSpaceSize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osSystemLoadAverage"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

        </UIPanel>

      </UILayout>    
...  
    </UILayouts>
  </UserInterfaceGlobal>


System Load Player 9 rows panel UI layout configuration example:

  <UserInterfaceGlobal> 
    <UILayouts>
...
      <UILayout
        Name = "SystemLoadPlayer9" >

        <UIPanel
          Name = "TableHead"
          BorderText = "System Load"
          BorderVisible = "True"
          ColumnAlignment = "False"
          LayoutType = "Table"
          Pos = "0,0"
          Size = "" >

          <UIObject
            Module = ""
            Name = "Computer"
            Pos = "1"
            Size = ""
            Type = "Label"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "PingTime"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountSend"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountReceive"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "SendQueueSize"
            Pos = "2"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "ReceiveQueueSize"
            Pos = "3"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "TimeBetweenStep"
            Pos = "4"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuLoad"
            Pos = "5"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuTime"
            Pos = "6"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osSystemCpuLoad"
            Pos = "7"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osCommittedVirtualMemorySize"
            Pos = "8"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osFreeSwapSpaceSize"
            Pos = "9"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osSystemLoadAverage"
            Pos = "10"
            Size = ""
            Type = "Info"
            Visible = "True" />

        </UIPanel>

      </UILayout>      
...  
    </UILayouts>
  </UserInterfaceGlobal>


System Load Player 4 rows panel UI layout configuration example:

  <UserInterfaceGlobal> 
    <UILayouts>
...
      <UILayout
        Name = "SystemLoadPlayer4" >

        <UIPanel
          Name = "TableHead"
          BorderText = ""
          BorderVisible = ""
          ColumnAlignment = ""
          LayoutType = "Table"
          Pos = ""
          Size = "" >

          <UIObject
            Module = ""
            Name = "Computer"
            Pos = "1"
            Size = ""
            Type = "Label"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osSystemCpuLoad"
            Pos = "2"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "osProcessCpuLoad"
            Pos = "3"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "TimeBetweenStep"
            Pos = "4"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "ReceiveQueueSize"
            Pos = "5"
            Size = ""
            Type = "Info"
            Visible = "True" />

          <UIObject
            Module = ""
            Name = "PingTime"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountSend"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "MessagesCountReceive"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "SendQueueSize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osProcessCpuTime"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osCommittedVirtualMemorySize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osFreeSwapSpaceSize"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

          <UIObject
            Module = ""
            Name = "osSystemLoadAverage"
            Pos = "0"
            Size = ""
            Type = "Info"
            Visible = "False" />

        </UIPanel>

      </UILayout>      
...  
    </UILayouts>
  </UserInterfaceGlobal>

Information table column size

The size of the columns in the information table is defined in:

File: .../C3Fire/Client/Files/Root/C3FireClientUIConfig.xml
Element: c3systems.tools.logging.systemLoad.ui.SystemLoadPanel


 <c3systems.tools.logging.systemLoad.ui.SystemLoadPanel 
    ComputerLabelWidth = "70"
    PropertyLabelWidth = "140" 
    ShowHorizontalLines = "False"
    ShowVerticalLines = "False" />