Struct tabin_plugins::procfs::Calculations [−][src]
The number of calculations that have occured on this computer in a time period
Fields
user: Jiffies
Time spent in user mode.
nice: Jiffies
Time spent in user mode with low priority (nice).
system: Jiffies
Time spent in system mode.
idle: Jiffies
Time spent not doing anything in particular
iowait: Jiffies
Time forced to be idle waiting for I/O to complete.
irq: Jiffies
Time spent servicing hardware interrupts
softirq: Jiffies
Time spent servicing software interrupts
steal: Jiffies
Stolen time, which is the time spent in other operating systems when running in a virtualized environment
guest: Jiffies
Time spent running a virtual CPU for a guest operating system. AKA time we lent out to virtual machines.
guest_nice: Option<Jiffies>
Time spent running a niced guest
Implementations
impl Calculations
[src]
pub fn load() -> Result<Calculations>
[src]
Build a new Calculations
for total CPU jiffies from the /proc/stat
pseudofile. See load_per_cpu
for per-cpu metrics.
pub fn load_per_cpu() -> Result<Vec<Calculations>>
[src]
Build a list of per-cpu metrics from the /proc/stat file
This does not include the total
line, use load()
for that.
pub fn active(&self) -> Jiffies
[src]
Jiffies spent non-idle
This includes all processes in user space, kernel space, and time stolen by other VMs.
pub fn idle(&self) -> Jiffies
[src]
Jiffies spent with nothing to do
pub fn virt(&self) -> Jiffies
[src]
Jiffies spent running child VMs
This is included in active()
by the nature of the way that
/proc/stats reports things, so don’t add this to that when totalling.
pub fn total(&self) -> Jiffies
[src]
All jiffies since the kernel started tracking
pub fn percent_util_since(&self, kind: &WorkSource, start: &Calculations) -> f64
[src]
Return how much cpu time the specific worksource took
The number returned is between 0 and 100
Trait Implementations
impl Clone for Calculations
[src]
fn clone(&self) -> Calculations
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Calculations
[src]
impl Display for Calculations
[src]
impl FromStr for Calculations
[src]
type Err = ProcFsError
The associated error which can be returned from parsing.
fn from_str(contents: &str) -> Result<Calculations>
[src]
Parse the entire /proc/stat file into a single Calculations
object
for total CPU
impl PartialEq<Calculations> for Calculations
[src]
fn eq(&self, other: &Calculations) -> bool
[src]
fn ne(&self, other: &Calculations) -> bool
[src]
impl StructuralPartialEq for Calculations
[src]
impl<'a> Sub<&'a Calculations> for &'a Calculations
[src]
type Output = Calculations
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Calculations
[src]
impl Sub<Calculations> for Calculations
[src]
Auto Trait Implementations
impl RefUnwindSafe for Calculations
impl Send for Calculations
impl Sync for Calculations
impl Unpin for Calculations
impl UnwindSafe for Calculations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,