pub struct SysStats {Show 17 fields
pub meminfo: Vec<MeminfoValue>,
pub vmstat: Vec<VmstatValue>,
pub cpu_stat: Vec<CpuTimes>,
pub num_forks: Option<u64>,
pub num_irq_total: Option<u64>,
pub num_irq: Vec<InterruptCount>,
pub num_softirq_total: Option<u64>,
pub num_softirq: Vec<InterruptCount>,
pub collection_end_timestamp: Option<u64>,
pub devfreq: Vec<DevfreqValue>,
pub cpufreq_khz: Vec<u32>,
pub buddy_info: Vec<BuddyInfo>,
pub disk_stat: Vec<DiskStat>,
pub psi: Vec<PsiSample>,
pub thermal_zone: Vec<ThermalZone>,
pub cpuidle_state: Vec<CpuIdleState>,
pub gpufreq_mhz: Vec<u64>,
}
Expand description
Various Linux system stat counters from /proc. The fields in this message can be reported at different rates and with different granularity. See sys_stats_config.proto.
Fields§
§meminfo: Vec<MeminfoValue>
§vmstat: Vec<VmstatValue>
§cpu_stat: Vec<CpuTimes>
One entry per cpu.
num_forks: Option<u64>
Num processes forked since boot. Populated only if FORK_COUNT in config.stat_counters.
num_irq_total: Option<u64>
Total num of irqs serviced since boot.
num_irq: Vec<InterruptCount>
§num_softirq_total: Option<u64>
Total num of softirqs since boot.
num_softirq: Vec<InterruptCount>
Per-softirq count.
collection_end_timestamp: Option<u64>
The time at which we finish collecting this set of samples; the top-level packet timestamp is the time at which we begin collection.
devfreq: Vec<DevfreqValue>
One entry per device.
cpufreq_khz: Vec<u32>
Cpu current frequency from /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq in kHz. One entry per cpu. Report 0 for offline cpu
buddy_info: Vec<BuddyInfo>
One entry per each node’s zones.
disk_stat: Vec<DiskStat>
One entry per disk device.
psi: Vec<PsiSample>
One entry per PsiResource type.
thermal_zone: Vec<ThermalZone>
§cpuidle_state: Vec<CpuIdleState>
§gpufreq_mhz: Vec<u64>
Read GPU frequency info on Intel/AMD devices.
Implementations§
Source§impl SysStats
impl SysStats
Sourcepub fn num_forks(&self) -> u64
pub fn num_forks(&self) -> u64
Returns the value of num_forks
, or the default value if num_forks
is unset.
Sourcepub fn num_irq_total(&self) -> u64
pub fn num_irq_total(&self) -> u64
Returns the value of num_irq_total
, or the default value if num_irq_total
is unset.
Sourcepub fn num_softirq_total(&self) -> u64
pub fn num_softirq_total(&self) -> u64
Returns the value of num_softirq_total
, or the default value if num_softirq_total
is unset.
Sourcepub fn collection_end_timestamp(&self) -> u64
pub fn collection_end_timestamp(&self) -> u64
Returns the value of collection_end_timestamp
, or the default value if collection_end_timestamp
is unset.
Trait Implementations§
Source§impl Message for SysStats
impl Message for SysStats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.