Make a systemd crash or memory leak visible on screen in under a minute.
Service Crash Watch is a dependency-free Linux dashboard for reproducing and recording service failures. It polls the real systemd unit, cgroup-v2 memory files, /proc, ss, and the journal, then puts the useful counters and restart events in one video-friendly page.
It was built while debugging an opencode serve remote project-picker memory leak, but the watcher accepts any systemd service on a cgroup-v2 Linux host.
The web UI refreshes every 500 ms and displays large, video-friendly counters:
- cgroup
memory.currentandmemory.peak - peak memory since dashboard startup
- PID, PID uptime, and
systemdrestart count - RSS, PSS, anonymous memory, process swap, and VmSize
- threads and file descriptors
- TCP connection counts for two ports, including
ESTABandCLOSE_WAIT - recent
journalctl -u <service>lines - detected PID changes and restart/crash events
The page flashes when PID or restart count changes, so crashes are visible in screen recordings.
No Python packages need to be installed. From a checkout on a Linux host with Python 3, systemd, cgroup v2, and the command-line tools listed below, start the dashboard and run its API smoke test:
./start-dashboard.shThe launcher is relative to its own checkout, so it works after cloning this repository elsewhere. It writes dashboard.pid, dashboard.log, and dashboard.err beside the scripts. To run the foreground server instead, use python3 opencode_watch_dashboard.py.
Open:
http://127.0.0.1:8765
Detailed installation and prerequisites, metrics and API, and operational notes are below the fold.
Environment variables:
OC_SERVICE=opencode-remote.service # systemd unit to watch
OC_DASH_HOST=127.0.0.1 # bind address
OC_DASH_PORT=8765 # HTTP portExample:
OC_SERVICE=opencode.service OC_DASH_PORT=8765 python3 opencode_watch_dashboard.py./start-dashboard.shThis starts the dashboard with nohup, writes dashboard.pid, and prints a JSON API smoke test.
GET /api
Returns the same metrics used by the page.
This is a local diagnostic dashboard, not a supervisor or alerting service. It reads the selected unit and recent journal; it does not restart services, retain history after process exit, or prove the root cause of a crash.
The watcher shells out to common Linux tools:
systemctljournalctlssps/proc/<pid>/status/proc/<pid>/smaps_rollup- cgroup v2 files under
/sys/fs/cgroup
No Python dependencies are required.
