Crate sys_metrics[][src]

sys_metrics is a crate used to get a system’s information.

It attempt to provide information about:

  • CPU
  • Disks
  • Host
  • Memory

Quick start

use sys_metrics::{cpu::*, disks::*, host::*, memory::*};

dbg!(get_host_info());
dbg!(get_uuid());
dbg!(get_cpufreq());
dbg!(get_cpustats());
dbg!(get_partitions_physical());
dbg!(get_iostats());
dbg!(get_iostats_physical());
dbg!(get_users());
dbg!(get_cpu_logical_count());
dbg!(get_memory());
dbg!(get_swap());

Modules

cpu

CPU information

disks

Disks information

host

Host system information

memory

Memory information

Structs

CLOCK_TICKS

Time units in jiffies (USER_HZ) (https://en.wikipedia.org/wiki/Jiffy_(time))

Functions

clock_ticks

Function used if you want to divide ticked value by the host’s jiffies (USER_HZ) value. (like CpuStats)