pub struct MsgLinuxSysState {
pub sender_id: Option<u16>,
pub mem_total: u16,
pub pcpu: u8,
pub pmem: u8,
pub procs_starting: u16,
pub procs_stopping: u16,
pub pid_count: u16,
pub time: u32,
pub flags: u8,
}Expand description
CPU, Memory and Process Starts/Stops
This presents a summary of CPU and memory utilization, including a timestamp.
Fields§
§sender_id: Option<u16>The message sender_id
mem_total: u16total system memory, in MiB
pcpu: u8percent of CPU used, expressed as a fraction of 256
pmem: u8percent of memory used, expressed as a fraction of 256
procs_starting: u16number of processes that started during collection phase
procs_stopping: u16number of processes that stopped during collection phase
pid_count: u16the count of processes on the system
time: u32timestamp of message, refer to flags field for how to interpret
flags: u8flags
Implementations§
Source§impl MsgLinuxSysState
impl MsgLinuxSysState
Sourcepub fn timestamp_type(&self) -> Result<TimestampType, u8>
pub fn timestamp_type(&self) -> Result<TimestampType, u8>
Gets the TimestampType stored in the flags bitfield.
Returns Ok if the bitrange contains a known TimestampType variant.
Otherwise the value of the bitrange is returned as an Err(u8). This may be because of a malformed message,
or because new variants of TimestampType were added.
Sourcepub fn set_timestamp_type(&mut self, timestamp_type: TimestampType)
pub fn set_timestamp_type(&mut self, timestamp_type: TimestampType)
Set the bitrange corresponding to the TimestampType of the flags bitfield.
Trait Implementations§
Source§impl Clone for MsgLinuxSysState
impl Clone for MsgLinuxSysState
Source§fn clone(&self) -> MsgLinuxSysState
fn clone(&self) -> MsgLinuxSysState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConcreteMessage for MsgLinuxSysState
impl ConcreteMessage for MsgLinuxSysState
Source§const MESSAGE_TYPE: u16 = 32522
const MESSAGE_TYPE: u16 = 32522
Source§const MESSAGE_NAME: &'static str = "MSG_LINUX_SYS_STATE"
const MESSAGE_NAME: &'static str = "MSG_LINUX_SYS_STATE"
Source§impl Debug for MsgLinuxSysState
impl Debug for MsgLinuxSysState
Source§impl<'de> Deserialize<'de> for MsgLinuxSysState
impl<'de> Deserialize<'de> for MsgLinuxSysState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FriendlyName for MsgLinuxSysState
impl FriendlyName for MsgLinuxSysState
fn friendly_name() -> &'static str
Source§impl From<MsgLinuxSysState> for Sbp
impl From<MsgLinuxSysState> for Sbp
Source§fn from(msg: MsgLinuxSysState) -> Self
fn from(msg: MsgLinuxSysState) -> Self
Source§impl PartialEq for MsgLinuxSysState
impl PartialEq for MsgLinuxSysState
Source§fn eq(&self, other: &MsgLinuxSysState) -> bool
fn eq(&self, other: &MsgLinuxSysState) -> bool
self and other values to be equal, and is used by ==.