Function mprober_lib::process::get_process_stat
source · pub fn get_process_stat(pid: u32) -> Result<ProcessStat, ScannerError>Expand description
Get the stat of a specific process found by ID by reading the /proc/PID/stat file and the /proc/PID/statm file.
use mprober_lib::process;
let process_stat = process::get_process_stat(1).unwrap();
println!("{process_stat:#?}");