1# @ajax/mesh-load-host
23This machine's load sample: the OS readers (CPU, PSI, memory, disk, thermal), rates between samples, the machine region and the member summary.
45This machine's side of the load telemetry (load.rs):
67- `mesh_host_read`: one sample of the host (per-CPU times, load average,
8PSI, memory, swap, meshd's own CPU, RSS and threads, free disk for the
9catalog, the hottest thermal zone), from Linux's /proc and /sys;
10- `mesh_host_derive`: rates between two samples (per-CPU utilisation by core
11class, iowait, PSI shares, meshd's CPU, swap-outs);
12- `mesh_machine_bytes`: the host block's machine region (S_LOAD..S_MLOAD);
13- `mesh_exec_totals`: the CPU executors' sums into it;
14- `mesh_loadrep`: the member summary sent to the cluster as F_LOADREP.
1516```c
17#include "mesh/load_host.h"
18```
1920## Ported from
2122[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/load.rs: `Host`, `os::core_classes`, `os::host`, `os::has_psi`, `self_cpu_us`, `disk`, `Derived`, `derive`, `machine_bytes`, `exec_totals`, `loadrep`.
2324## Tests
2526- `tests/load_host.c`: load.rs's `machine_region_and_loadrep` and `this_host_samples`, and the executors' totals.
2728## Differences
2930- The macOS reader (IOKit core classes, host_statistics64, memorystatus, thermal state) is not ported: there is no Mac here; `mesh_host_read` says so on other systems.
31- `exec_totals` takes the native workers' and the log's counts as arguments instead of reading another module's statics.
3233## Licence
3435MIT. See the repository's LICENSE.