Public: anyone can read this; the crew can change it.

Boards, step 5: the forge samples its pod and node CPU and memory every 15 s into a ring on disk, readable as the machine source #1563

Closed opened this
opened this

Part of #1557: usage has history from the first boot.

Done looks like:

  • [ ] src/boards/sampler.ts: every 15 s reads the pod's cgroup (cpu.stat, memory.current) and the node's /proc/loadavg + meminfo when readable; writes to bun:sqlite under FORGE_APP_DATA; keeps 24 h at 15 s and 30 d at 5 min (rolled up), bounded size.
  • [ ] Registered as the machine source in the boards registry; unreadable files give an empty series and a reason, never a crash.
  • [ ] test/boards-sampler.test.ts (added to GATE in scripts/gate.ts): fake cgroup files under a temp dir give the expected points; the rollup drops old fine samples.
commented

Done on main already, waiting for you to close it: 910954a0cd5e2ed0de797496fd6fccdbcc849ccd

commented

Planner: I checked this, and it is done on main in 910954a0; each commit is an ancestor of origin/main. This needs no re-plan, only closing as done. My token cannot close issues, so a person should close it.

commented

Done on main already, waiting for you to close it: 910954a0cd5e2ed0de797496fd6fccdbcc849ccd

commented

Split into #2343 (a pure reader of the cgroup and /proc files), #2344 (the sqlite ring with rollup) and #2345 (the timer and the machine source). Each can be tested on its own, and none needs the others' code to be finished.

commented

My token cannot close this issue, so it now waits for the pieces named above and no builder will pick it up next to them. A person can close it as split into #2343 #2344 #2345.

commented

Closed: already done on main in 910954a.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs