Package rst.devices.generic¶
This package collects device-independent data types.
It is only intended for data types which do not make sense outside the context of a specific device. Try to use generic data types instead, if possible.
Messages¶
Message BatteryState¶
-
class
rst.devices.generic.
BatteryState
¶ Provides information about the state of a single battery.
Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>
-
current
¶ Type: FLOAT32
Unit: ampere
Indicates the electrical current draining or charging the battery at the moment.
Negative currents indicate discharging of the battery, positive ones indicate an attached charger.
-
charge_level
¶ Type: FLOAT32
Unit: number
Constraint:
0<=value<=1
Indicates the current charging level of the battery, where 1 means full and 0 indicates completely empty.
-
battery_temperature
¶ Type: FLOAT32
Unit: degree-celsius
The temperature of the battery.
-
message BatteryState {
/**
* Indicates the electrical current draining or charging the battery at the
* moment.
*
* Negative currents indicate discharging of the battery, positive ones
* indicate an attached charger.
*/
// @unit(ampere)
optional float current = 1;
/**
* Indicates the current charging level of the battery, where 1 means full
* and 0 indicates completely empty.
*/
// @unit(number)
// @constraint(0<=value<=1)
required float charge_level = 2;
/**
* The temperature of the battery.
*/
// @unit(degree-celsius)
optional float battery_temperature = 3;
}
Message HostInformation¶
-
class
rst.devices.generic.
HostInformation
¶ Low-level information of the CPU utilization for a single system with potentially multiple cores.
This message is currently designed closely along the information available in the Linux proc filesystem. So it is probably only directly useful for Linux systems.
Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
hostname
¶ Type: ASCII-STRING
Name of the host being monitored.
-
memory_state
¶ Type: rst.devices.generic.MemoryState
Information about the memory usage.
-
cpu_state
¶ Type: rst.devices.generic.CpuState
Information about the CPU usage.
-
process_num
¶ Type: UINT64
The number of processes currently being executed on the system.
-
message HostInformation {
/**
* Name of the host being monitored.
*/
optional string hostname = 1;
/**
* Information about the memory usage.
*/
optional MemoryState memory_state = 2;
/**
* Information about the CPU usage.
*/
optional CpuState cpu_state = 3;
/**
* The number of processes currently being executed on the system.
*/
optional uint64 process_num = 4;
}
Message CpuState¶
-
class
rst.devices.generic.
CpuState
¶ Low-level information of the CPU utilization for a single system with potentially multiple cores.
This message is currently designed closely along the information available in the Linux proc filesystem. So it is probably only directly useful for Linux systems.
Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
jiffy_length
¶ Type: UINT32
Unit: microsecond
The length of one measurement tick for the individual CPU counters.
-
cpus
¶ Type: array of rst.devices.generic.CpuState.Cpu
An entry for each (virtualized) CPU or core of a multicore system.
-
load_1
¶ Type: FLOAT32
Unit: number
Constraint:
value>=0
Load average for one minute as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes
-
load_5
¶ Type: FLOAT32
Unit: number
Constraint:
value>=0
Load average for 5 minutes as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes
-
load_15
¶ Type: FLOAT32
Unit: number
Constraint:
value>=0
Load average for 15 minute as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes
-
message CpuState {
/**
* The length of one measurement tick for the individual CPU counters.
*/
// @unit(microsecond)
optional uint32 jiffy_length = 10;
/**
* Measurements for a single CPU in the system.
*
* The supported detailed fields for each CPU vary with different Kernel
* versions. In oder to calculate at least a valid load of the CPU,
* minimally total and idle need to be given. Hence, they are required
* fields. Ideally, @ref .idle + all other detail fields should sum up to
* the total value.
*
* With each new measurement all counters must fulfill the condition
* new value >= previous value. I.e. these are ever-increasing numbers and
* differences need to be calculated to find out the current system
* statistics.
*
* All values are measured in abstract ticks of a fixed length. This length
* is specified @ref CpuState.jiffy_length.
*/
message Cpu {
/**
* Identifier for the respective CPU or core in a multicore system.
*/
// @unit(number)
required int32 index = 1;
/**
* Total time spent by this CPU so far in any mode including idle.
*/
// @unit(number)
required uint64 total = 100;
/**
* Time spent idle.
*/
// @unit(number)
required uint64 idle = 5;
/**
* Time spent in user mode.
*/
// @unit(number)
optional uint64 user = 2;
/**
* Time spent in user mode with nice (low) priority.
*/
// @unit(number)
optional uint64 user_low = 3;
/**
* Time spent in system mode.
*/
// @unit(number)
optional uint64 system = 4;
/**
* Time spent waiting for IO to complete.
*/
// @unit(number)
optional uint64 iowait = 6;
/**
* Time spent servicing interrupts.
*/
// @unit(number)
optional uint64 irq = 7;
/**
* Time spent servicing softirqs.
*/
// @unit(number)
optional uint64 softirq = 8;
/**
* Time spent in another operating system in case of a virtualized system.
*/
// @unit(number)
optional uint64 steal = 9;
/**
* Time spent running a virtualized guest.
*/
// @unit(number)
optional uint64 guest = 10;
}
/**
* An entry for each (virtualized) CPU or core of a multicore system.
*/
repeated Cpu cpus = 20;
/**
* Load average for one minute as defined by the linux kernel, e.g. in
* man proc:
* The first three fields in this file are load average figures giving the
* number of jobs in the run queue (state R) or waiting for disk I/O
* (state D) averaged over 1, 5, and 15 minutes
*/
// @unit(number)
// @constraint(value>=0)
optional float load_1 = 40;
/**
* Load average for 5 minutes as defined by the linux kernel, e.g. in
* man proc:
* The first three fields in this file are load average figures giving the
* number of jobs in the run queue (state R) or waiting for disk I/O
* (state D) averaged over 1, 5, and 15 minutes
*/
// @unit(number)
// @constraint(value>=0)
optional float load_5 = 41;
/**
* Load average for 15 minute as defined by the linux kernel, e.g. in
* man proc:
* The first three fields in this file are load average figures giving the
* number of jobs in the run queue (state R) or waiting for disk I/O
* (state D) averaged over 1, 5, and 15 minutes
*/
// @unit(number)
// @constraint(value>=0)
optional float load_15 = 42;
}
Message Cpu¶
-
class
rst.devices.generic.CpuState.
Cpu
¶ Measurements for a single CPU in the system.
The supported detailed fields for each CPU vary with different Kernel versions. In oder to calculate at least a valid load of the CPU, minimally total and idle need to be given. Hence, they are required fields. Ideally,
idle
+ all other detail fields should sum up to the total value.With each new measurement all counters must fulfill the condition new value >= previous value. I.e. these are ever-increasing numbers and differences need to be calculated to find out the current system statistics.
All values are measured in abstract ticks of a fixed length. This length is specified <Could not resolve reference to CpuState.jiffy_length> .
-
index
¶ Type: INT32
Unit: number
Identifier for the respective CPU or core in a multicore system.
-
total
¶ Type: UINT64
Unit: number
Total time spent by this CPU so far in any mode including idle.
-
idle
¶ Type: UINT64
Unit: number
Time spent idle.
-
user
¶ Type: UINT64
Unit: number
Time spent in user mode.
-
user_low
¶ Type: UINT64
Unit: number
Time spent in user mode with nice (low) priority.
-
system
¶ Type: UINT64
Unit: number
Time spent in system mode.
-
iowait
¶ Type: UINT64
Unit: number
Time spent waiting for IO to complete.
-
irq
¶ Type: UINT64
Unit: number
Time spent servicing interrupts.
-
softirq
¶ Type: UINT64
Unit: number
Time spent servicing softirqs.
-
steal
¶ Type: UINT64
Unit: number
Time spent in another operating system in case of a virtualized system.
-
guest
¶ Type: UINT64
Unit: number
Time spent running a virtualized guest.
-
message Cpu {
/**
* Identifier for the respective CPU or core in a multicore system.
*/
// @unit(number)
required int32 index = 1;
/**
* Total time spent by this CPU so far in any mode including idle.
*/
// @unit(number)
required uint64 total = 100;
/**
* Time spent idle.
*/
// @unit(number)
required uint64 idle = 5;
/**
* Time spent in user mode.
*/
// @unit(number)
optional uint64 user = 2;
/**
* Time spent in user mode with nice (low) priority.
*/
// @unit(number)
optional uint64 user_low = 3;
/**
* Time spent in system mode.
*/
// @unit(number)
optional uint64 system = 4;
/**
* Time spent waiting for IO to complete.
*/
// @unit(number)
optional uint64 iowait = 6;
/**
* Time spent servicing interrupts.
*/
// @unit(number)
optional uint64 irq = 7;
/**
* Time spent servicing softirqs.
*/
// @unit(number)
optional uint64 softirq = 8;
/**
* Time spent in another operating system in case of a virtualized system.
*/
// @unit(number)
optional uint64 steal = 9;
/**
* Time spent running a virtualized guest.
*/
// @unit(number)
optional uint64 guest = 10;
}
Message MemoryState¶
-
class
rst.devices.generic.
MemoryState
¶ Usage information about the system memory of a processing node.
Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
Code author: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
-
total
¶ Type: FLOAT32
Unit: byte
Constraint:
value>=0
The total amount of system memory available.
-
used
¶ Type: FLOAT32
Unit: byte
Constraint:
0<=value<=.total
The currently used amount of memory. This includes everything including cached memory etc. Stated the other way around,
total
- <Could not resolve reference to .free> must result in the amount of memory currently being completely unused.
-
usable
¶ Type: UINT64
Unit: byte
Constraint:
0<=value<=.total
The amount of working memory that can be used by processes without swapping, either because it is directly free or it can be reclaimed.
-
swap_total
¶ Type: UINT64
Unit: byte
Constraint:
value>=0
The amount of swap space available.
-
swap_used
¶ Type: UINT64
Unit: byte
Constraint:
0<=value<=.swap_total
The amount of swap space currently being used.
-
message MemoryState {
/**
* The total amount of system memory available.
*/
// @unit(byte)
// @constraint(value>=0)
optional float total = 2;
/**
* The currently used amount of memory. This includes everything including
* cached memory etc. Stated the other way around, @ref .total - @ref .free
* must result in the amount of memory currently being completely unused.
*/
// @unit(byte)
// @constraint(0<=value<=.total)
optional float used = 3;
/**
* The amount of working memory that can be used by processes without
* swapping, either because it is directly free or it can be reclaimed.
*/
// @unit(byte)
// @constraint(0<=value<=.total)
optional uint64 usable = 4;
/**
* The amount of swap space available.
*/
// @unit(byte)
// @constraint(value>=0)
optional uint64 swap_total = 5;
/**
* The amount of swap space currently being used.
*/
// @unit(byte)
// @constraint(0<=value<=.swap_total)
optional uint64 swap_used = 6;
}