procstat 1.0.4

Parses the /proc/stat file into a struct.
Documentation
  • Coverage
  • 0%
    0 out of 36 items documented0 out of 3 items with examples
  • Size
  • Source code size: 21.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.7 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • botagar

ProcStat

A simple parser for the /proc/stat file found on all unix based systems.

Specifications for this file can be found on Random Sites Like This.

How to use

Import it into your cargo.toml as a dependency.

[dependencies]
procstat = "1.0.4"

Add it to the entry point of your project

extern crate procstat;
use procstat::ProcStat;

Then call it

...
let proc_stat = ProcStat::read();
let aggregated_cpu_data = proc_stat.cpu;
...

Notes from the author

Code review welcome.

I'm not a full time rust developer by any means so always willing to listen to those who do this more than I.

Stay safe and be good to each other!