Struct tabin_plugins::procfs::pid::Process[][src]

pub struct Process {
    pub stat: Stat,
    pub cmdline: CmdLine,
}

Information about a running process

Fields

stat: Stat

The stat info for a process

cmdline: CmdLine

The command line, as revealed by the /proc fs

Implementations

impl Process[src]

pub fn from_pid<P: Display + Copy>(p: P) -> Result<Process>[src]

pub fn useful_cmdline(&self) -> String[src]

pub fn percent_ram(&self, of_bytes: usize) -> f64[src]

What percent this process is using

First argument should be in bytes.

pub fn cpu_utilization_since<'a>(
    &'a self,
    start_process: &'a Process,
    total_cpu: Jiffies
) -> ProcessCpuUsage<'a>
[src]

Compare this processes cpu utilization since the process representing th start time

The passed-in start_process is the time that we are comparing against: self should be newer.

The total_cpu is how many Jiffies have passed on the cpu over the same time period.

Panics

If the total_cpu on start_process is higher than the total_cpu on current.

Trait Implementations

impl Clone for Process[src]

impl Debug for Process[src]

impl Default for Process[src]

impl Eq for Process[src]

impl PartialEq<Process> for Process[src]

impl StructuralEq for Process[src]

impl StructuralPartialEq for Process[src]

Auto Trait Implementations

impl RefUnwindSafe for Process

impl Send for Process

impl Sync for Process

impl Unpin for Process

impl UnwindSafe for Process

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.