$ cd ../
Netdev Watch — bash

user@devops:~$ cat README.md

Netdev Watch

# Description

Netdev Watch is a C++23 CLI tool that reads the Linux kernel network counters from /proc/net/dev — the 16 RX/TX fields per interface (bytes, packets, errors, drops, fifo, frame, compressed, multicast). It renders a per-interface table (lo, eth0...) with human-readable totals (34.6M / 648.0M) and thousands separators for packets (1,515,100). Interfaces with errors or drops are flagged with a color threshold (green = clean, yellow = errors present). Watch mode (--watch N) with periodic refresh computes live rates between samples (RX rate, TX rate, RX pkt/s, TX pkt/s) as counter deltas. Includes system context: load average (/proc/loadavg) and uptime (/proc/uptime). Valid JSON output for scripting (--json), plain output for pipes (--no-color) and a 35-case self-test (--selftest) that validates the parser against real and synthetic /proc/net/dev lines. Strict parsing: malformed or truncated lines are rejected. Zero dependencies: direct g++ -std=c++23 compilation, standard library only.

# Key features

$ Linux kernel network counters: /proc/net/dev with the 16 RX/TX fields per interface

$ Human formatting: readable totals (34.6M / 648.0M) and thousands separators for packets (1,515,100)

$ Per-interface color threshold: green = clean, yellow = errors or drops present

$ Watch mode with live rates between samples: RX rate, TX rate, RX pkt/s, TX pkt/s

$ System context: load average (/proc/loadavg) and uptime (/proc/uptime)

$ Valid JSON output for scripting (--json)

$ 35-case self-test including live /proc/net/dev read (--selftest)

$ Zero dependencies: direct g++ build without CMake (C++23, GCC 14)

# Gallery

Desktop view
Netdev Watch - Desktop view
Mobile view
Netdev Watch - Mobile view

# Technologies used

C++23