Skip to content

bandwhich - Per-Process Bandwidth Monitor Cheatsheet

bandwhich - Per-Process Bandwidth Monitor Cheatsheet

bandwhich is a Rust terminal utility that displays current network utilization broken down by process, connection, and remote IP/hostname. Unlike iftop (per-connection) or nethogs (per-process only), bandwhich correlates sockets to the owning process and resolves remote endpoints, so you instantly see which app — and which remote host — is consuming bandwidth.

Installation

PlatformCommand
Cargo (all platforms)cargo install bandwhich
Arch Linuxsudo pacman -S bandwhich
Debian/Ubuntusudo apt install bandwhich
Fedorasudo dnf install bandwhich
macOS (Homebrew)brew install bandwhich
Nixnix-env -iA nixpkgs.bandwhich
Prebuilt binaryDownload from the GitHub Releases page

Privileges

bandwhich must sniff packets, so it needs elevated capabilities:

# Simplest: run with sudo
sudo bandwhich

# Or grant the binary capabilities once (no sudo afterward, Linux)
sudo setcap cap_net_raw,cap_net_admin=eip $(which bandwhich)

Basic Usage

CommandDescription
sudo bandwhichMonitor all interfaces, live TUI
sudo bandwhich -i eth0Watch a single interface
sudo bandwhich --interface wlan0Same, long form
bandwhich --helpFull option list
bandwhich --versionVersion

Key Options

OptionDescription
-i, --interface NAMELimit monitoring to one interface
-n, --no-resolveSkip reverse-DNS lookups (faster, raw IPs)
-r, --rawMachine-readable, non-interactive output (good for logging)
-p, --processesShow only the processes table
-c, --connectionsShow only the connections table
-a, --addressesShow only the remote-addresses table
--total-utilizationPrint a one-shot total instead of the live UI
-s, --show-dnsInclude DNS queries in the connection view
-d, --dns-server IPUse a specific resolver for reverse lookups

Interactive Keys

KeyAction
TabCycle the layout / rotate which table is expanded
SpacePause / resume updates
/ Scroll within a table
q / Ctrl+CQuit

Reading the Display

bandwhich shows three live tables:

TableTells you
Utilization by processWhich executables are sending/receiving, with up/down rates
ConnectionsEach socket: local → remote, protocol, and per-connection rate
Utilization by remote addressWhich remote hosts (resolved) you’re exchanging the most data with

Rates are shown as current up (▲) and down (▼) throughput, refreshed about once per second.

Common Workflows

# "What is eating my upload right now?" — processes only, no DNS lag
sudo bandwhich -p -n

# Investigate a noisy interface and log a raw stream for later analysis
sudo bandwhich -i eth0 --raw | tee bandwhich-eth0.log

# One-shot snapshot of total utilization (scripts/cron)
sudo bandwhich --total-utilization -n

# Find the top remote talkers (e.g. an exfiltration or backup job)
sudo bandwhich -a

bandwhich vs Other Network Monitors

ToolGranularityNotes
bandwhichProcess + connection + remote hostRust TUI, resolves remotes
nethogsPer processNo remote-host grouping
iftopPer connectionNo process attribution
nloadPer interface totalsSimple aggregate graph
iptraf-ngPer interface/connectionOlder ncurses suite

Resources