scripts/c: add single-file C port of hbc_mini
hbc_mini.c is a full port of scripts/hbc_mini.py requiring only zlib,
pthreads, and a C11 compiler. Supports Linux, FreeBSD, NetBSD, and
DragonFly BSD with platform-specific plugin backends:
- cpu_monitor: /proc/stat (Linux) or kern.cp_time sysctl (BSD)
- memory_monitor: /proc/meminfo (Linux), vm.stats.vm.* (FreeBSD),
struct uvmexp (NetBSD)
- network_monitor:/proc/net/dev (Linux) or getifaddrs()+if_data (BSD)
- disk_monitor: df -P (all platforms)
- ping_monitor: ping subprocess (all platforms)
- nagios_runner: shell commands with perfdata parsing (all platforms)
- os_info: uname() + /etc/os-release (Linux) or kern.osrelease (BSD)
Build: cc -O2 -o hbc_mini hbc_mini.c -lz -lpthread -lm
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in: