$ cd ../
snmp-watch — bash

user@devops:~$ cat README.md

snmp-watch

# Description

snmp-watch (cpp-snmp-watch) is a Linux kernel SNMP / netstat counter monitor written in C++23 with no external dependencies. It reads /proc/net/snmp (Ip, Icmp, IcmpMsg, Tcp, Udp, UdpLite) and /proc/net/netstat (TcpExt, IpExt, MPTcpExt) by pairing Proto: names / Proto: values lines. Distinguishes gauges (CurrEstab, DefaultTTL, RTO) from monotonic counters. Flags alerts by name (Error, Fail, Drop, Abort, Timeout, NoPort, Overflow, Csum, NoRoute). KPIs: IP in/out, TCP estab, retrans, UDP NoPorts, octets, ListenDrops, TCPTimeouts. Watch mode (--watch N) with delta and rate /s (first frame never uses parse-time dt). JSON (--json) with summary + sections object. --demo with 9 sections. Filters --section, --nonzero, --alerts. --file parses dumps and skips # comments. --no-color with a mutable ANSI palette (0 escapes in pipes). Selftest 59 checks: parser, gauges, alerts, filters, JSON, live /proc read. Zero deps: g++ -std=c++23 -O2 -Wall -Wextra.

# Key features

$ Reads /proc/net/snmp + /proc/net/netstat: Proto: names / values pairs

$ Gauges (CurrEstab, TTL, RTO) vs counters with /s rates

$ Alerts Error/Fail/Drop/Abort/Timeout/NoPort/Overflow/Csum/NoRoute

$ KPIs: IP in/out, TCP estab, retrans, UDP NoPorts, octets, ListenDrops

$ Watch mode (--watch N) with deltas and rates between snapshots

$ JSON output (--json) with summary + sections (python -m json.tool)

$ --demo 9 sections and --no-color with 0 ANSI codes

$ Selftest 59 checks + zero dependencies: g++ -std=c++23

# Gallery

Project terminal
snmp-watch - Project terminal
Mobile view
snmp-watch - Mobile view

# Technologies used

C++23