Function mprober_lib::cpu::get_all_cpus_stat [−][src]
pub fn get_all_cpus_stat(
with_average: bool
) -> Result<Vec<CPUStat>, ScannerError>
Get all CPUs’ stats with or without the average by reading the /proc/stat
file.
extern crate mprober_lib; use mprober_lib::cpu; let all_cpus_stat = cpu::get_all_cpus_stat(false).unwrap(); println!("{:#?}", all_cpus_stat);