Struct procinfo::pid::Cpu[][src]

pub struct Cpu {
    pub cpuid: String,
    pub user: usize,
    pub nice: usize,
    pub system: usize,
    pub idle: usize,
    pub iowait: usize,
    pub irq: usize,
    pub softirq: usize,
    pub steal: usize,
    pub guest: usize,
    pub guest_nice: usize,
}

Fields

cpuid: String

system (“cpu” line) or the specific CPU (“cpuN” line) spent in various states

user: usize

Time spent in user mode.

nice: usize

Time spent in user mode with low priority (nice).

system: usize

Time spent in system mode.

idle: usize

Time spent in the idle task. This value should be USER_HZ times the second entry in the /proc/uptime pseudo-file.

iowait: usize

Time waiting for I/O to complete. This value is not reliable, for the following rea‐ sons:

                       1. The CPU will not wait for I/O to complete;
                          iowait is the time that a task is waiting for
                          I/O to complete.  When a CPU goes into idle
                          state for outstanding task I/O, another task
                          will be scheduled on this CPU.

                       2. On a multi-core CPU, the task waiting for I/O
                          to complete is not running on any CPU, so the
                          iowait of each CPU is difficult to calculate.

                       3. The value in this field may decrease in certain conditions.
irq: usize

Time servicing interrupts.

softirq: usize

Time servicing softirqs.

steal: usize

Stolen time, which is the time spent in other operating systems when running in a virtu‐alized environment

guest: usize

Time spent running a virtual CPU for guest operating systems under the control of the Linux kernel

guest_nice: usize

Time spent running a niced guest (virtual CPU for guest operating systems under the control of the Linux kernel)

Trait Implementations

impl Debug for Cpu[src]

impl Eq for Cpu[src]

impl Hash for Cpu[src]

impl PartialEq<Cpu> for Cpu[src]

impl StructuralEq for Cpu[src]

impl StructuralPartialEq for Cpu[src]

Auto Trait Implementations

impl RefUnwindSafe for Cpu

impl Send for Cpu

impl Sync for Cpu

impl Unpin for Cpu

impl UnwindSafe for Cpu

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.