skip to content
[readonly]

This machine's load sample: the OS readers (CPU, PSI, memory, disk, thermal), rates between samples, the machine region and the member summary

sh
$ sexc add @ajax/mesh-load-host
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 05:24v/# 1 version
  • drwxr-xr-x-Oct 27 05:24files/# the files of 0.1.0
latest
0.1.0, published Oct 27 05:24 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-load-proc ^0.1.0, @ajax/mesh-load-share ^0.1.0, @ajax/mesh-abi-host-load ^0.1.0, @ajax/mesh-abi-host-mload ^0.1.0, @ajax/mesh-abi-host-pload ^0.1.0, @ajax/mesh-abi-backend ^0.1.0, @ajax/mesh-buf ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/mesh-samplers
keywords
mesh alphaos load host telemetry cpu memory
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-load-host
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-load-host
2
3This machine's load sample: the OS readers (CPU, PSI, memory, disk, thermal), rates between samples, the machine region and the member summary.
4
5This machine's side of the load telemetry (load.rs):
6
7- `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.
15
16```c
17#include "mesh/load_host.h"
18```
19
20## Ported from
21
22[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`.
23
24## Tests
25
26- `tests/load_host.c`: load.rs's `machine_region_and_loadrep` and `this_host_samples`, and the executors' totals.
27
28## Differences
29
30- 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.
32
33## Licence
34
35MIT. See the repository's LICENSE.