pub struct LoadAvg { /* private fields */ }
Expand description
Read the load average from /proc/loadavg.
Implementations§
Source§impl 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 StructuralPartialEq for LoadAvg
Auto Trait Implementations§
impl Freeze for LoadAvg
impl RefUnwindSafe for LoadAvg
impl Send for LoadAvg
impl Sync for LoadAvg
impl Unpin for LoadAvg
impl UnwindSafe for LoadAvg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more