Skip to content

bandwhich

A terminal tool that shows which processes and remote hosts are using your network bandwidth right now.

Stars
12k
Forks
355
Licence
MIT
Language
Rust
Last update
3 months ago
Type
CLI

What it is

bandwhich is a command-line program that shows how much network bandwidth is being used right now, broken down by process, connection, and remote IP or hostname. It listens on a network interface, matches traffic to the programs that own it, and tries to resolve addresses to hostnames in the background. People use it to find out what is consuming their connection.

  • Watch live per-process bandwidth usage in the terminal
  • See which remote IPs or hostnames a program is connecting to
  • Limit the output to one view, such as only processes or only connections, using flags
  • Show cumulative totals with the -t option
  • Output machine-friendlier text with the -r option for scripts

Great for

  • People who want to see which program is using their bandwidth at a given moment
  • System administrators checking traffic on a Linux, macOS, or Windows machine from a terminal
  • Users comfortable running a terminal tool that needs elevated privileges
  • Anyone on a small router or server running a supported Linux architecture

Not ideal for

  • Users who need long-term traffic history or alerting; the README describes only live monitoring
  • Users who cannot grant elevated privileges, since the tool sniffs packets and needs them
  • Anyone wanting a graphical interface; it is a terminal dashboard
  • Users needing new features, because the project is in passive maintenance and critical issues only
Step-by-step guide: how to use bandwhichInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Rust toolchain with cargo (minimum version set in Cargo.toml) · On Windows: npcap

    Clone the repository

    git clone https://github.com/imsnif/bandwhich.git

    Enter the project directory

    cd bandwhich

    Build a release binary

    cargo build --release
  2. 2

    Run it

    • Build the binary with cargo build --release, or download a prebuilt archive from the releases page
    • On Linux, grant capabilities with sudo setcap cap_sys_ptrace,cap_dac_read_search,cap_net_raw,cap_net_admin+ep $(command -v bandwhich), or run with sudo
    • Run bandwhich, optionally with -i to pick an interface such as eth0
    • Read the process, connection, and remote address tables as they update
  3. 3

    Get the most out of it

    • Use -i to choose the network interface you want to monitor
    • Use -n to skip hostname resolution if you want faster or offline output
    • Use -u to change the units, such as bin-bits or si-bytes
    • Use -d to point reverse lookups at a specific DNS server, or -s to show DNS queries
    • Use --log-to with -v to write debug logs to a file when troubleshooting

Downloads

Strengths

  • Written in Rust and distributed as prebuilt binaries for several Linux, macOS, and Windows targets
  • Adapts its display to the terminal size, showing less when space is limited
  • Has a permissive MIT license and a long public history with many stars

Trade-offs

  • The project is in passive maintenance, so no new features are planned and fixes are limited to critical issues
  • Requires elevated privileges (setcap or sudo) to capture packets, which has security trade-offs on shared machines
  • Windows use requires installing npcap first

How it compares

ProjectStarsTypeLevelUpdatedBest for
bandwhich (this)12kCLIintermediate3 months agoPeople who want to see which program is using their bandwidth at a given moment
bore11.6kCLIbeginner9 months agoDevelopers who want to share a local web app or API with someone for a quick test
Alamofire42.4kLibraryintermediate5 days agoSwift developers building iOS or macOS apps that call web APIs
ant-design-pro38.9kFrameworkintermediate8 days agoDevelopers building internal admin dashboards or back-office tools in React
tokio33.6kLibraryadvanced5 days agoRust developers building network servers or clients
libuv27.3kLibraryadvanced5 days agoDevelopers building networked or I/O-heavy software in C or a language with C bindings

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.