bandwhich is a terminal-based CLI utility for displaying real-time network bandwidth utilization broken down by process, connection, and remote IP or hostname.
The tool solves the problem of understanding which processes and connections are consuming network bandwidth on a system. It works by sniffing packets on a given network interface and recording IP packet sizes, then cross-referencing this data with system process information retrieved from the proc filesystem on Linux, lsof on macOS, or the Windows API on Windows. The interface is responsive to terminal window size, showing less detail when space is constrained, and attempts to resolve IP addresses to hostnames through reverse DNS lookups on a best-effort basis.
bandwhich suits developers and system administrators who need to diagnose network performance issues or monitor bandwidth consumption at a granular level. It runs on Linux, macOS, Windows, and Android, with full support for x64 and aarch64 architectures on the major platforms and best-effort support for armv7hf on Linux and aarch64 on Android. The tool requires elevated privileges to sniff network packets, which can be granted either through setcap on Linux or sudo on other platforms.
The project is in passive maintenance, with critical issues addressed but no active feature development. Pull requests are welcomed, and the maintainers are open to applications for co-maintainership from contributors willing to engage long-term with the codebase.