[][src]Struct procfs::CpuTime

pub struct CpuTime {
    pub user: f32,
    pub nice: f32,
    pub system: f32,
    pub idle: f32,
    pub iowait: Option<f32>,
    pub irq: Option<f32>,
    pub softirq: Option<f32>,
    pub steal: Option<f32>,
    pub guest: Option<f32>,
    pub guest_nice: Option<f32>,
}

The amount of time, measured in seconds, the CPU has been in specific states

Fields

user: f32

Seconds spent in user mode

nice: f32

Seconds spent in user mode with low priority (nice)

system: f32

Seconds spent in system mode

idle: f32

Seconds spent in the idle tast

iowait: Option<f32>

Seconds waiting for I/O to complete

This value is not reliaable, for the following reasons:

  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, this task waiting for I/O to complete is not running on any CPU, so the iowait for each CPU is difficult to calculate.

  3. The value in this field may decrease in certain conditions.

(Since Linux 2.5.41)

irq: Option<f32>

Seconds servicing interrupts

(Since Linux 2.6.0)

softirq: Option<f32>

Seconds servicing softirqs

(Since Linux 2.6.0)

steal: Option<f32>

Seconds of stolen time.

Stolen time is the time spent in other operating systems when running in a virtualized environemnt.

(Since Linux 2.6.11)

guest: Option<f32>

Seconds spent running a virtual CPU for guest operating systems under control of the linux kernel

(Since Linux 2.6.24)

guest_nice: Option<f32>

Seconds spent running a niced guest

(Since Linux 2.6.33)

Trait Implementations

impl Debug for CpuTime[src]

Auto Trait Implementations

impl RefUnwindSafe for CpuTime

impl Send for CpuTime

impl Sync for CpuTime

impl Unpin for CpuTime

impl UnwindSafe for CpuTime

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.