Struct linux_info::system::LoadAvg
source · [−]pub struct LoadAvg { /* private fields */ }Expand description
Read the load average from /proc/loadavg.
Implementations
sourceimpl LoadAvg
impl LoadAvg
sourcepub fn average(&self) -> Option<(f32, f32, f32)>
pub fn average(&self) -> Option<(f32, f32, f32)>
Get the average of jobs in the queue or waiting for disk I/O.
The values are averaged over (1 min, 5 min, 15 min).
sourcepub fn threads(&self) -> Option<(usize, usize)>
pub fn threads(&self) -> Option<(usize, usize)>
Returns two values (runnable threads, running threads).
sourcepub fn newest_pid(&self) -> Option<u32>
pub fn newest_pid(&self) -> Option<u32>
Returns the PID of the most recent process.
Trait Implementations
impl Eq for LoadAvg
impl StructuralEq for LoadAvg
impl StructuralPartialEq for LoadAvg
Auto Trait Implementations
impl RefUnwindSafe for LoadAvg
impl Send for LoadAvg
impl Sync for LoadAvg
impl Unpin for LoadAvg
impl UnwindSafe for LoadAvg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more