TL;DR — Quick Summary
bandwhich shows real-time network bandwidth usage per process, connection, and remote host. See exactly what's eating your bandwidth.
bandwhich answers: “What’s using my network?” See bandwidth per process, per connection, and per remote host — all in real-time.
Installation
# macOS
brew install bandwhich
# Arch Linux
sudo pacman -S bandwhich
# Cargo
cargo install bandwhich
# Set capabilities (avoid sudo each time)
sudo setcap cap_net_raw,cap_net_admin+ep $(which bandwhich)
Usage
# Monitor all network activity
sudo bandwhich
# Specific interface
sudo bandwhich -i eth0
sudo bandwhich -i wlan0
# DNS resolution off (faster startup)
sudo bandwhich -n
# Views (press Tab to switch):
# 1. Processes — bandwidth per process
# 2. Connections — bandwidth per connection
# 3. Remote hosts — bandwidth per remote IP/hostname
Comparison
| Feature | bandwhich | iftop | nload | nethogs |
|---|---|---|---|---|
| Per-process | Yes | No | No | Yes |
| Per-connection | Yes | Yes | No | No |
| Per-host | Yes | Yes | No | No |
| Interface total | Yes | Yes | Yes | No |
| DNS resolve | Yes | Yes | No | No |
| TUI | Yes | Yes | Yes | Yes |
Summary
- bandwhich shows real-time bandwidth per process, connection, and remote host
- Tab between three views: processes, connections, remote hosts
- DNS resolution shows hostnames instead of raw IPs
- Written in Rust for efficient packet capture
- Requires root/sudo or setcap for network access