Vitals log viewer

egui viewer for the vitals-log CSV files: status strip, grouped
time-series plots, incremental tailing of the monthly logs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 23:40:38 -07:00
co-authored by Claude Fable 5.1
commit 07f68b92a0
7 changed files with 5342 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# vitals
Viewer for the CSV logs written by `vitals-log` (`~/.local/bin/vitals-log`, run
every minute by the `vitals-log.timer` systemd user unit). Shows the latest
reading and time-series plots of temperatures, battery, memory, memory pressure
and load. Built with egui and egui_plot.
cargo install --path .
vitals [--dir PATH] [--interval SECONDS] [--range 1h|6h|24h|7d|all]
The log directory defaults to `$XDG_STATE_HOME/vitals` (`~/.local/state/vitals`).
Every `vitals-YYYY-MM.csv` there is loaded at startup; after that only bytes
appended since the last check are read (every 10 s by default). Columns are
matched by header name, so a changed log layout shows gaps rather than breaking.
Drag to pan and ctrl-scroll or pinch to zoom the time axis; all plots move
together. Picking a range preset returns to following the clock. Lines break
where the logger was not running, and on-battery periods are shaded in the
battery plot. Wide ranges are reduced to per-bucket min/max, so spikes stay
visible.
- `src/data.rs` — parsed series, windowing, gap splitting, downsampling
- `src/tail.rs` — incremental file reader, month rollover, replaced-file reload
- `src/main.rs` — the UI; the `PANELS` table defines the plots