| Crates.io | procstat |
| lib.rs | procstat |
| version | 1.0.4 |
| created_at | 2021-09-14 12:58:35.841983+00 |
| updated_at | 2021-09-19 10:29:09.110276+00 |
| description | Parses the /proc/stat file into a struct. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 451204 |
| size | 21,528 |
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.
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;
...
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!