vitals/systemd/vitals.service
Christian Sass 9d065153b0 Vitals 0.1.0: workload map with browser tab accounting
Process monitors stop at the browser boundary, so the thing that usually
pegs a machine is invisible: forty identical processes, no age, no tab
names, no idea which page is the offender.

Vitals resolves every process to a human identity (container, flatpak,
systemd unit, tree root, or script), then joins the OS view to the
browser's own DevTools counters so each tab carries its own page-work
number beside the cores its browser instance is burning. The gap between
those two numbers is the diagnosis: idle page, burning compositor.

- dependency-free sampler over /proc, 2s cadence, 5 min in-memory history
- minimal CDP client (WebSocket + JSON) with no third-party packages
- both unit systems side by side: percent of machine and fractional cores
- flags for leaked automation instances and live WebRTC calls
- user service with CPUQuota so the monitor can never be the problem
- identity tests that need no root, server, or browser

MIT licensed. Runs on Linux, reads /proc, asks for no privilege.
2026-10-19 16:42:54 -05:00

19 lines
485 B
Desktop File

[Unit]
Description=Vitals — workload and browser-tab monitor
Documentation=https://forge.binaryranch.com/sastian/vitals
After=graphical-session.target network.target
PartOf=graphical-session.target
[Service]
Type=simple
WorkingDirectory=%h/Projects/vitals
ExecStart=/usr/bin/python3 %h/Projects/vitals/server.py --port 8791
Restart=on-failure
RestartSec=3
# a monitor must never be the reason a machine is slow
Nice=10
CPUQuota=25%
MemoryMax=256M
[Install]
WantedBy=default.target