heim-process 0.1.0

Cross-platform processes information
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use heim_common::prelude::*;
use heim_runtime::{self as runtime, SyncRuntime};
use heim_process as process;

fn main() -> Result<()> {
    let mut rt = runtime::new()?;

    println!("USER\tPID\t%MEM\tVSZ\tRSS\tNICE\tSTATUS\tSTART TIME\tCMDLINE");
    for process in rt.block_collect(process::processes()) {
        let process = process?;

        println!(" \t{}",
            process.pid(),
        );
    }

    Ok(())
}