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::*};

fn main() {
    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