Struct nix::sys::sysinfo::SysInfo
#[repr(transparent)]
pub struct SysInfo(_);
Documentation
System info structure returned by sysinfo
.
Implementations
impl SysInfo
pub fn load_average(&Self) -> (f64, f64, f64)
Returns the load average tuple.
The returned values represent the load average over time intervals of 1, 5, and 15 minutes, respectively.
pub fn process_count(&Self) -> u16
Current number of processes.
pub fn swap_total(&Self) -> u64
Returns the amount of swap memory in Bytes.
pub fn swap_free(&Self) -> u64
Returns the amount of unused swap memory in Bytes.
pub fn ram_total(&Self) -> u64
Returns the total amount of installed RAM in Bytes.
pub fn ram_unused(&Self) -> u64
Returns the amount of completely unused RAM in Bytes.
“Unused” in this context means that the RAM in neither actively used by programs, nor by the operating system as disk cache or buffer. It is “wasted” RAM since it currently serves no purpose.
Trait Implementations
impl Debug for SysInfo
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Hash for SysInfo
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl StructuralEq for SysInfo
impl StructuralPartialEq for SysInfo
Auto Trait Implementations
impl RefUnwindSafe for SysInfo
impl UnwindSafe for SysInfo
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T