proc_monitor

Crates.ioproc_monitor
lib.rsproc_monitor
version0.1.2
sourcesrc
created_at2022-09-01 13:37:47.954713
updated_at2022-09-04 07:34:29.410896
descriptionLinux/Macos process monitor.
homepagehttps://github.com/tqlab/proc-rs
repository
max_upload_size
id656697
size100,249
(tqlab)

documentation

README

Get current process infomation for monitor.

Example

use crate::proc_monitor;

let p = proc_monitor::get_info();
println!(
   "cpus: {}, pid: {}, mem toal: {}, mem free: {}, cpu: {:.2}, usr: {:.2}, sys: {:.2}, mem: {:.2}, process cpu: {:.2}, process mem: {:.2}",
   p.cpu_count,
   p.pid,
   p.mem_total,
   p.mem_free,
   p.percent_cpu,
   p.percent_cpu_user,
   p.percent_cpu_system,
   p.percent_mem,
   p.percent_cpu_process,
   p.percent_mem_process
);
Commit count: 0

cargo fmt