Crate sys_metrics[][src]

Expand description

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

dbg!(get_cpu_logical_count());
dbg!(get_cpufreq());
dbg!(get_cpustats());
dbg!(get_cputimes());
dbg!(get_loadavg());
dbg!(get_physical_ioblocks());
dbg!(get_partitions_physical());
dbg!(get_host_info());
dbg!(get_hostname());
dbg!(get_os_version());
dbg!(get_logged_users());
dbg!(get_users());
dbg!(get_uuid());
dbg!(get_memory());
dbg!(get_swap());
dbg!(has_swap());
dbg!(get_physical_ionets());
dbg!(get_virt_info());

Modules

cpu

CPU information

disks

Disks information

host

Host system information

memory

Memory information

network

Network information

virt

Virtualization information

Functions

clock_ticks

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