14SystemsPython 3.10+ · Linux /proc & sysfs · stdlib only
System Monitor
A pure-stdlib CLI that reads CPU, memory and disk usage straight from the kernel and writes each sample as one JSON line — the low-level core of what a metrics collector does, with nothing hidden behind a library.
Open source on GitHub
The lowest level of observability
Before you visualise metrics you have to collect them. system-monitor implements that first stage on the thinnest layer available — reading the Linux kernel's own numbers from /proc/stat and /proc/meminfo and walking disk stats through os.statvfs.
Each sample is appended to the log as one JSON line, so the output stays parseable by any JSON-lines tool and grows by exactly one line per interval. A --count flag turns it into a bounded session instead of an infinite tail.
Built on the kernel, not a wrapper
The point of the tool is to show the mechanism rather than hide it behind a dependency. Where Prometheus node_exporter does this across the fleet, this is the same idea reduced to a single readable Python file that talks to the kernel it is running on.
It stays deliberately narrow: three metrics, one output format, no config file — a clean baseline for whatever sits on top of it.
What makes it technically interesting
- Reads /proc/stat and /proc/meminfo directly and measures disk via os.statvfs — no psutil, no external agents
- Every reading goes out as a single JSON line: timestamp, cpu.used_percent, memory totals/available/used, and disk path used/free
- --interval picks seconds between samples, --count stops after a fixed number of readings (0 runs until Ctrl+C), --disk-path targets any mount point
- One dependency-free file, runnable anywhere Python 3.10 runs; the log streams in a format any JSON-lines reader can consume