procsys 0.7.0

Rust library to retrieve system, kernel, and process metrics from the pseudo-filesystems /proc and /sys
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use procsys::net_unix;

fn main() {
    let netunix = net_unix::collect().expect("network unix information");

    // print all network unix information in json output
    match serde_json::to_string_pretty(&netunix) {
        Ok(output) => println!("{}", output),
        Err(err) => {
            log::error!("{}", err);
            std::process::exit(1);
        }
    }
}