meshd's live network counters: bytes and frames per peer link and kind, the control port's and the HTTP relay's
$ sexc add @ajax/mesh-net-counters- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 05:23v/# 1 version
- drwxr-xr-x-Oct 27 05:23files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 05:23 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-abi-host-links ^0.1.0, @ajax/mesh-abi-host-net ^0.1.0, @ajax/mesh-abi-peer-frames ^0.1.0, @ajax/mesh-abi-snapshot ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-host-block
- keywords
- mesh alphaos network counters
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-net-counters
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-net-counters 2 3meshd's live network counters: bytes and frames per peer link and kind, the control port's and the HTTP relay's. 4 5meshd's live network counters (mesh-abi "Network I/O"). 6 7Per peer link, the bytes and frames by kind meshd reads and writes; the control port's and the HTTP relay's bytes and requests. Every counter is a cumulative u64 since meshd started, a relaxed atomic bumped once per frame or request by the thread that moved it; `fill` copies them into a host status block at snapshot time (viewers derive rates). 8 9```c 10#include "mesh/net_counters.h" 11``` 12 13## Ported from 14 15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/net.rs: `LinkCounters`, `Counters` (rx, tx, ctl, http, fill). 16 17## Tests 18 19- `tests/net_counters.c`: net.rs's `counters_fill_the_block`. 20 21## Licence 22 23MIT. See the repository's LICENSE.