A Hardware tab: what the machine is made of

Per machine, like every other page. Four tiles — processor, memory, storage,
graphics — over a card for each.

Memory is the part that had nowhere to live before: every slot, with the
module's size, type, form factor, rated and running speed, maker, part
number, serial, rank and voltage, and the empty slots marked empty. A module
whose maker is only a JEDEC id gets a name when it is one we know and keeps
the number when it is not, because a wrong name is worse than a code.

Everything is read from what Debian already has: dmidecode for the parts only
the firmware knows, lscpu, lspci, sysfs. None of it changes under a running
kernel, so it is read once and kept for ten minutes; Re-read is for the one
thing that does change, a drive plugged in.

Every reader is allowed to come back empty. A machine with no dmidecode, no
root to read it with, or no PCI bus at all still gets a page, with a note
saying what was missing and why. Checked against the Mac mini, which is all
three cases at once: no SMBIOS memory table, a GPU only the device tree knows
about, and cores that are not all alike — lscpu counts one cluster as "cores
per socket" there, so without SMT the thread count is the honest answer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-25 21:41:40 -07:00
co-authored by Claude Opus 5
parent 09dc846730
commit 776bcb236d
8 changed files with 1115 additions and 4 deletions
+17
View File
@@ -177,6 +177,23 @@ something long in one, switch away and back, refresh — it's all still there.
the daemon's sampling clock; the chart window is always 300 samples, so 30 s at 100 ms
and 10 min at 2 s. Still to do: persistent
history (SQLite ring, e.g. 10 s × 7 days), SMART (`smartctl -j`), longer time ranges.
- **Hardware tab** — **shipped 2026-09-25** (`internal/hardware`, `internal/api/hardware.go`,
`Hardware.tsx`): what the machine is physically made of, per machine like every other page.
Four headline tiles (processor, memory, storage, graphics) over cards for each: the
processor with its cores, clock range, socket, caches, microcode and the handful of feature
flags anyone asks about; **every memory slot** with size, type, form factor, rated and
running speed, maker, part number, serial, rank and voltage, and the empty ones marked
empty; each drive with model, size, bus, firmware and serial; each display adapter with its
driver, PCI address and video memory; and the board itself — model, firmware and date,
serial, kernel. Read from what Debian already has (dmidecode for what only the firmware
knows, lscpu, lspci, sysfs) and cached for ten minutes, since none of it changes under a
running kernel; "Re-read" is there for the one thing that does, a drive plugged in.
Every reader may come back empty and the page says what it could not read and why: a
machine with no dmidecode, no root, or no PCI bus still gets a page. Verified on `core`
(SMBIOS, Intel graphics) and on the Mac mini (Asahi: no SMBIOS memory table, a
device-tree GPU, heterogeneous cores — where lscpu's "cores per socket" counts one
cluster, so without SMT the thread count is the honest core count).
- **Sensors** — **shipped 2026-09-19** (`internal/sensors`, `internal/metrics/sensors.go`,
`internal/api/status_sensors.go`, `web/src/sensors.ts`, `widgets.tsx`, `Embed.tsx`;
reference in `SENSORS.md`): everything measured is a sensor with a stable dotted ID;