Function mprober_lib::process::get_process_stat[][src]

pub fn get_process_stat(pid: u32) -> Result<ProcessStat, ScannerError>

Get the stat of a specific process found by ID by reading the /proc/PID/stat file and the /proc/PID/statm file.

extern crate mprober_lib;

use mprober_lib::process;

let process_stat = process::get_process_stat(1).unwrap();

println!("{:#?}", process_stat);