bandwhich — network bandwidth monitor
💬 "bandwhich command"
bandwhich is a network bandwidth monitor tool that displays network usage in real-time by process and connection.
It classifies network traffic by process and connection. Unlike iftop, it shows matching up to process names.
- Concept: Classifies network traffic by process and connection.
- Main Feature: Unlike iftop, it shows matching up to process names.
- Advantage: Shows bandwidth changes in seconds.
- Usage: You can monitor only specific network interfaces.
Installation and Download
bandwhich is installed via package manager or official script.
| Environment | Command |
|---|---|
| Ubuntu / Debian | sudo apt install bandwhich |
| Fedora / RHEL | sudo dnf install bandwhich |
| Arch | sudo pacman -S bandwhich |
| macOS (brew) | brew install bandwhich |
| Rust cargo | cargo install bandwhich |
| Binary Download | github.com/imsnif/bandwhich/releases |
Verify installation with bandwhich --version.
Frequently Used Options
| Option | Description |
|---|---|
| -i eth0 | Monitors a specific interface |
| -c | Displays connection list |
| -p | Displays process list |
| -r | Shows only receive |
| -s | Shows only send |
3 Essential Command Combinations
sudo bandwhich— Monitors total network usagesudo bandwhich -i eth0— Monitors only specific interfacesudo bandwhich -p— Checks usage by process only
💬 "Show me examples of using bandwhich on an actual server"
I've organized common situations encountered on servers in operation.
Step 1 · Verify Installation
Check if installed.
bandwhich --version || sudo apt install -y bandwhich
Step 2 · Start Monitoring
Monitor the entire network.
sudo bandwhich
Step 3 · Check by Process
View usage by process.
sudo bandwhich -p
Actual Execution Screen
This is the screen showing network usage by process after running bandwhich.
!bandwhich command execution result
Server in actual operation
In Practice, It's Used Like This
1. Finding High-Bandwidth Processes
Situation — Check who is using a lot of bandwidth.
sudo bandwhich -p
Result — You can see nginx is using most of it.
Point — Useful for identifying the process causing traffic spikes.
2. Checking External Connections
Situation — Check which IPs are communicating.
sudo bandwhich -c
Result — IP and port per connection are displayed.
Point — You can immediately detect suspicious external connections.
Actual Execution Screen
This is the screen monitoring only the process list.
!bandwhich command execution result 2
Server in actual operation
Points to Note
- bandwhich requires root permissions (sudo).
- If the terminal is small, the screen may break. Minimum 80x24 is recommended.
- If run in an SSH session, monitoring will stop when the session ends.
Source (HTML): https://games.aidebatehub.com/programs/linux/modern/bandwhich.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments