Struct SysInfo

struct SysInfo(_)

System info structure returned by sysinfo.

Implementations

impl SysInfo

fn load_average(self: &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: &Self) -> Duration

Returns the time since system boot.

fn process_count(self: &Self) -> u16

Current number of processes.

fn swap_total(self: &Self) -> u64

Returns the amount of swap memory in Bytes.

fn swap_free(self: &Self) -> u64

Returns the amount of unused swap memory in Bytes.

fn ram_total(self: &Self) -> u64

Returns the total amount of installed RAM in Bytes.

fn ram_unused(self: &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.

impl Clone for SysInfo

fn clone(self: &Self) -> SysInfo

impl Copy for SysInfo

impl Debug for SysInfo

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for SysInfo

impl Freeze for SysInfo

impl Hash for SysInfo

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl PartialEq for SysInfo

fn eq(self: &Self, other: &SysInfo) -> bool

impl RefUnwindSafe for SysInfo

impl Send for SysInfo

impl StructuralPartialEq for SysInfo

impl Sync for SysInfo

impl Unpin for SysInfo

impl UnsafeUnpin for SysInfo

impl UnwindSafe for SysInfo

impl<T> Any for SysInfo

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SysInfo

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SysInfo

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for SysInfo

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SysInfo

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for SysInfo

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for SysInfo

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for SysInfo

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SysInfo

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>