Struct linux_proc::stat::Stat [−][src]
pub struct Stat { pub cpu_totals: StatCpu, pub cpus: Vec<StatCpu>, pub context_switches: u64, pub boot_time: u64, pub processes: u64, pub procs_running: u64, pub procs_blocked: u64, }
The stats from /proc/stat
.
Fields
cpu_totals: StatCpu
Total stats, sum of all cpus.
cpus: Vec<StatCpu>
For each cpu, the number of units spent in different contexts.
context_switches: u64
Number of context switches since the system booted.
boot_time: u64
Timestamp (in seconds since epoch) that system booted.
processes: u64
The total number of processes and threads created since system booted.
procs_running: u64
The total number of processes running on the cpu.
procs_blocked: u64
The total number of processes waiting to run on the cpu.
Methods
impl Stat
[src]
impl Stat
pub fn from_system() -> Result<Self>
[src]
pub fn from_system() -> Result<Self>
Parse the contents of /proc/stat
.
Trait Implementations
impl Debug for Stat
[src]
impl Debug for Stat
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Stat
[src]
impl Clone for Stat
fn clone(&self) -> Stat
[src]
fn clone(&self) -> Stat
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for Stat
[src]
impl Eq for Stat
impl PartialEq for Stat
[src]
impl PartialEq for Stat
fn eq(&self, other: &Stat) -> bool
[src]
fn eq(&self, other: &Stat) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Stat) -> bool
[src]
fn ne(&self, other: &Stat) -> bool
This method tests for !=
.
impl Ord for Stat
[src]
impl Ord for Stat
fn cmp(&self, other: &Stat) -> Ordering
[src]
fn cmp(&self, other: &Stat) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Stat
[src]
impl PartialOrd for Stat
fn partial_cmp(&self, other: &Stat) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Stat) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Stat) -> bool
[src]
fn lt(&self, other: &Stat) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Stat) -> bool
[src]
fn le(&self, other: &Stat) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Stat) -> bool
[src]
fn gt(&self, other: &Stat) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Stat) -> bool
[src]
fn ge(&self, other: &Stat) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for Stat
[src]
impl Hash for Stat