skip to content
==> README.md <==
1# @ajax/mesh-load-proc
2
3Parsers of the Linux /proc files the load sampler reads: stat, pressure, meminfo, loadavg, key-value files.
4
5The pure parsers of load.rs: /proc/stat's CPU times, the big/little core classes, PSI (the /proc/pressure files), /proc/meminfo, /proc/loadavg and `key value` / `Key: value` files. Errors are the Rust's text. The OS readers that feed them are mesh-load-host.
6
7```c
8#include "mesh/load_proc.h"
9```
10
11## Ported from
12
13[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/load.rs: `CpuTimes` (since), `parse_proc_stat`, `classify`, `class_util`, `Psi`, `parse_psi`, `psi_rate`, `MemInfo`, `parse_meminfo`, `parse_loadavg`, `field`.
14
15## Tests
16
17- `tests/load_proc.c`: load.rs's `proc_stat`, `cpu_rates`, `classes`, `psi_and_meminfo`, with the error texts.
18
19## Differences
20
21- Per-CPU results are fixed arrays of `MESH_MAX_CPUS` with a presence flag, where the Rust has `Vec<Option<_>>`.
22
23## Licence
24
25MIT. See the repository's LICENSE.