user@devops:~$ cat README.md
PSI Monitor
# Description
PSI Monitor is a C++23 CLI tool that reads Linux kernel Pressure Stall Information metrics (/proc/pressure/cpu, /proc/pressure/memory and /proc/pressure/io) — the resource contention indicator that measures the percentage of time tasks were stalled waiting for CPU, memory or I/O. It renders a table with 'some' (at least one task stalled) and 'full' (all tasks stalled) metrics over avg10, avg60 and avg300 windows, plus accumulated stall time (total) formatted human-readable (16.3B / 876.7M us). Pressure is classified with color thresholds (green < 10%, yellow 10-50%, red >= 50%) and HIGH PRESSURE alerts. Includes system context: load average with running/total processes and last PID, uptime with accumulated idle per core and CPU count. Watch mode (--watch N) with periodic refresh and clean Ctrl+C exit, valid JSON output for scripting (--json), plain output for pipes (--no-color) and a 13-case self-test (--selftest) that validates the parser against real PSI lines. Strict parsing: malformed values reject the line. Zero dependencies: direct g++ -std=c++23 compilation, standard library only.
# Key features
$ Linux kernel PSI metrics: /proc/pressure/{cpu,memory,io} with 'some' and 'full'
$ avg10/avg60/avg300 windows (% stall) and accumulated total formatted (16.3B us)
$ Color thresholds: green < 10%, yellow 10-50%, red >= 50% with pressure alert
$ System context: load average, running/total procs, last PID, uptime and idle
$ Watch mode with periodic refresh (--watch N) and clean Ctrl+C exit
$ Valid JSON output for scripting (--json)
$ 13-case self-test including live /proc/pressure read (--selftest)
$ Zero dependencies: direct g++ build without CMake (C++23, GCC 14)
# Gallery
# Technologies used