Keeping tabs on your internet usage
Shashank Sharma isn’t too keen on tracking calories, but he’s always interested in learning where his gigabytes of internet data goes…
BANDWHICH
Credit: https://github.com/imsnif/bandwhich
OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi and an avid Arch user. He’s in love with Go and Python, but Rust has been on his mind quite a bit lately.
Almost all desktop distributions feature a graphical system monitor utility that can be used to track usage of vital system resources such as memory, SWAP, CPU, and even network history – specifically the amount of data that you’ve downloaded or uploaded. As useful as this is, such tools don’t inform you of the amount of data transmitted by individual applications. If this is the sort of information you’re after, Bandwhich is meant for you.
Written in Rust and released under the MIT license, the Bandwhich utility follows the old Unix philosophy of doing one thing well. Its purpose is limited to sniffing a given network interface and then reporting on how data has been used by the different processes, connections and remote IP/hostname.
mmmm, sandwhich
Because Bandwhich is written in Rust, one distro-neutral option to install it is to use Cargo, the package manager for Rust utilities. If you don’t already have Rust and Cargo installed, you can use your distro’s package manager to install these. The sudo dnf install rust cargo command will install these on RPM-based distributions. If you’re running Ubuntu or Debian or one of their derivatives then you can similarly run the sudo apt install cargo command, which will also install the Rustc package.