meshd's two once-a-second samplers: the load telemetry (machine and programs) and the network interfaces
$ sexc add @ajax/mesh-samplers- 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-shared ^0.1.0, @ajax/mesh-load-host ^0.1.0, @ajax/mesh-load-prog ^0.1.0, @ajax/mesh-load-share ^0.1.0, @ajax/mesh-nic ^0.1.0, @ajax/mesh-cpuuse ^0.1.0, @ajax/mesh-log ^0.1.0, @ajax/mesh-abi ^0.1.0, @ajax/mesh-buf ^0.1.0, @ajax/mesh-chan ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/meshd
- keywords
- mesh alphaos load network telemetry threads
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-samplers
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-samplers 2 3meshd's two once-a-second samplers: the load telemetry (machine and programs) and the network interfaces. 4 5meshd's two sampler threads. 6 7- load (load.rs `sampler`): every second, this machine's host sample and 8every loaded program's (mesh-load-host, mesh-load-prog) into the host 9block's load regions and the mailbox's LOAD_PAGE; in a fleet, the member 10summary to every member (F_LOADREP) and the scheduler's report (F_PERF, 11through the fleet's hook). 12- net (net.rs `sampler`): every second, the interfaces that carry (or 13carried) a peer link, and the total, into the host block's NIC records. 14 15Both run until sh->quit; a host that cannot be read is said once per distinct error, and the sample's age shows it to viewers. 16 17```c 18#include "mesh/samplers.h" 19``` 20 21## Ported from 22 23[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/load.rs `sampler`; crates/mesh-host/src/net.rs `sampler`. 24 25## Tests 26 27- `tests/samplers.c`: both run on this machine for a few seconds: load samples, CPUs, memory, a program's record, the load page, NIC samples and the total; both stop on quit. 28 29## Differences 30 31- The fleet's scheduler report (`perf_report`, F_PERF) goes through the `mesh_load_perf` hook the fleet area sets; F_LOADREP is broadcast here. 32 33## Licence 34 35MIT. See the repository's LICENSE.