Struct SysInfo
#[repr(transparent)]
pub struct SysInfo(/* private field */);
System info structure returned by sysinfo.
Implementations
impl SysInfo
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.
fn uptime(&self) -> DurationReturns the time since system boot.
fn process_count(&self) -> u16Current number of processes.
fn swap_total(&self) -> u64Returns the amount of swap memory in Bytes.
fn swap_free(&self) -> u64Returns the amount of unused swap memory in Bytes.
fn ram_total(&self) -> u64Returns the total amount of installed RAM in Bytes.
fn ram_unused(&self) -> u64Returns 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 Clone for SysInfo
fn clone(&self) -> Self
impl Copy for SysInfo
impl Debug for SysInfo
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for SysInfo
impl Hash for SysInfo
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for SysInfo
fn eq(&self, other: &Self) -> bool