explaingit

imsnif/bandwhich

11,739RustAudience · ops devopsComplexity · 2/5LicenseSetup · easy

TLDR

A terminal tool that shows which programs and network connections on your computer are using bandwidth right now, with a live-updating table broken down by process, connection, and remote address.

Mindmap

mindmap
  root((bandwhich))
    What it does
      Live bandwidth monitor
      Per process breakdown
      Per connection view
      Remote hostname lookup
    Platform support
      Linux proc filesystem
      macOS via lsof
      Windows API
    Setup
      Pre-built binaries
      Rust cargo build
      Elevated permissions
    Project status
      Passive maintenance
      Critical fixes only
      Open to co-maintainers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Identify which process is consuming your bandwidth during a slow download or upload

USE CASE 2

Monitor live outbound connections by remote hostname to spot unexpected network traffic

USE CASE 3

Debug network usage on a Linux server without a graphical interface by breaking it down per process

USE CASE 4

Capture a bandwidth snapshot during development or deployment to understand which services are talking to what

Tech stack

RustCargo

Getting it running

Difficulty · easy Time to first run · 5min

Needs elevated permissions to read raw packets, either run with sudo each time or do a one-time capability grant on Linux, Windows users must install npcap first.

Use, modify, and distribute freely for any purpose including commercial, just keep the copyright notice.

In plain English

bandwhich is a terminal program that shows you which processes and connections on your computer are using network bandwidth right now. Instead of seeing total network traffic as one big number, you get a live-updating table that breaks it down by individual program, by active connection, and by the remote address on the other end. It works by listening directly on a network interface and inspecting the packets passing through it. On Linux it cross-references that data with the process filesystem to figure out which program owns which connection. On macOS it uses a system tool called lsof to do the same thing. On Windows it uses the Windows API. If a remote IP address can be resolved to a readable hostname, it attempts to do that in the background. Because the tool reads raw network packets, it needs elevated permissions to run. On Linux you can either grant it permanent capabilities with a one-time setup command, or run it with sudo each time. On Windows you may need to install npcap, a packet capture library, before the tool will work. On macOS no extra steps are needed. Pre-built binaries are available for Linux, macOS, and Windows across common processor architectures, so most people do not need to compile it. Those who want to build it themselves can do so with the standard Rust build tool, cargo. Cross-compiling for ARM and Android is also supported. The project is written in Rust and released under the MIT license. It is currently in passive maintenance: critical fixes are applied, but no new features are being added due to limited contributor availability. The maintainers have noted they are open to co-maintainers joining.

Copy-paste prompts

Prompt 1
I installed bandwhich on Linux, give me the one-time command to grant it capabilities so I can run it without sudo every time
Prompt 2
Show me how to build bandwhich from source with cargo and run it on an ARM Linux device
Prompt 3
How do I install npcap on Windows so bandwhich can capture packets there?
Prompt 4
Write a shell script that runs bandwhich for 60 seconds, captures the output to a log file, and timestamps the result
Prompt 5
How does bandwhich resolve remote IP addresses to hostnames and can I disable that to speed up the display?
Open on GitHub → Explain another repo

← imsnif on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.