user@devops:~$ cat README.md
Diskstats
# Description
Diskstats (cpp-diskstats) is a disk I/O monitor written in C++23 that reads /proc/diskstats and /sys/block to show real block-device activity: completed operations (reads/writes), bytes transferred (sectors x 512), boot-averaged rates (IOPS, KB/s, %busy, average latency), disk type (SSD/HDD via /sys/block/*/queue/rotational) and physical size. It includes a watch mode with live delta rates every N seconds (--watch N), full JSON output for scripting (--json) with {timestamp, uptime_s, disks[], summary} structure, sorting by name|r|w|iops|busy (--sort), device limit (--top N), virtual-device filtering (loop/ram/zram/sr0), optional ANSI colors (--no-color) and 18 self-verification tests (--selftest). Zero dependencies: direct build with g++ -std=c++23.
# Key features
$ Live disk I/O monitor: IOPS, throughput (KB/s), %busy and average latency per device
$ Watch mode with delta rates every N seconds (--watch N) and on-screen refresh
$ SSD/HDD type and real size detection via /sys/block/*/queue/rotational and /size
$ Full JSON output for scripting: disks[] with device, type, reads, writes, bytes, rps, wps, r_kb_s, w_kb_s, busy_pct, avg_io_ms
$ Sorting by name|r|w|iops|busy and device limit with --top N
$ Virtual-device filtering (loop, ram, zram, sr0) and auto-scaled B/K/M/G formatting
$ 18 self-verification tests: real /proc/diskstats parsing, metric derivation and JSON structural validation (--selftest)
# Gallery
# Technologies used