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

Boards, step 5a: readMachine(root) turns cgroup and /proc files into one CPU and memory point #2343

shipped production is serving it opened this has it
opened this

Replaces part of #1563, which builders left without a pull.

Done looks like:

  • [ ] src/boards/machine.ts exports a pure readMachine(root). It reads cpu.stat and memory.current from the pod's cgroup, and /proc/loadavg and meminfo when they are readable, under a root that tests can point elsewhere. It returns a point, or a reason when nothing is readable. It never throws.
  • [ ] No timer and no storage.
  • [ ] test/boards-machine.test.ts (in GATE) uses fake files under a temp dir and gets the expected point. A missing directory gives the reason.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs