Decisions › D19

A plug or unplug shows in the log within a tenth of a second, and the Computer is live

Decision
D19
Date
2026-10-23
Status
Accepted
Area
logging

Context

Zach reported that he saw no change in the activity log. The kernel log was being re-read every 10 seconds. He also wanted the Computer's own data to feel like a system monitor.

The decision

A plug or unplug is a provisional event from udevadm monitor within 0.1 s, confirmed in place by the kernel log: the same id, so it is never shown twice. The kernel log is followed with journalctl -f instead of being re-read. Every event is typed (usb, link, usb_error, driver binds, network carrier, pcie error, level change, fault, boot, plugin) and can be filtered, and a stream of new and changed events is available to the page.

A plugin may declare an optional long-running follow verb: one process per device, restarted with a backoff if it dies, bounded in line size and memory. The computer's own plugin follows at 1 Hz.

Why

“I don't see any change in the activity log”

Zach Yamaoka, 23 Oct 2026

“something that feels a bit like system monitor with the live data”

Zach Yamaoka, 23 Oct 2026

Options considered

OptionVerdictReason
Re-read the kernel log every 10 sReplacedThe behaviour Zach saw: no change within a visible time.
Follow the kernel log and listen for udev eventsChosenImmediate; the provisional and the confirmed event are one row.
A periodic diagnose for the ComputerReplaced for the ComputerA 1 Hz follower fills the history window at the plugin's rate, which a system-monitor view needs.

Consequences

  • The Computer is an entity with CPU, memory, disks, temperatures, GPU, USB bandwidth and clock checks, using ROS's own monitors and thresholds, with a resource-monitor page on top.
  • A silent follower goes stale like any other check.

Evidence

  • Activity log: one stream, two channelsReport, 2026-10-23. Evidence for this decision.
  • Server API v1Contract doc, 2026-10-22. What the page may rely on: state, activity, plugins, actions and their single-use tokens, history, settings.
  • IO diagnostics v1: build planContract doc, 2026-10-22. The decisions, the plugin boundary (a subprocess speaking JSON lines), the lanes, and the interfaces frozen between them.

Commits in the app's repository (private):

  • de278f2 2026-10-23 Port activity in real time and a live Computer
  • 07c358e 2026-10-23 Computer diagnostics: a computer plugin on the host entity

← All decisions