Bandwhich, visualize what uses the bandwidth from the terminal

about band which

In the next article we are going to take a look at Bandwhich. This is a tool to know the real-time utilization of the bandwidth from the command line. In addition to being free and open source, we will find it available for Gnu / Linux and MacOS. It is released under the MIT license. The main objective of this tool is to show what occupies our bandwidth.

With this tool we can obtain a real-time visualization of what process occupies bandwidth utilization, connection and remote IP / hostname. It is a good tool for monitoring the network in real time.

Bandwhich detects a given network interface and records the size of the IP packet, cross-referencing the file system / Proc on Gnu / Linux or lsof on macOS. also can try to resolve the ips to your hostname in the background using reverse DNS.

Default, bandwhich runs in interactive mode and has 3 panels showing the information. In the first we can find the use of the network by process name, the second will indicate the use by connection and in the third we can check the use by remote address. Because bandwhich has a responsive user interface, the terminal window in which we run this tool must be large enough to display all the panels. Depending on the width and / or height of the window, one, two or all three panels can be displayed.

Install bandwhich on Ubuntu

The easiest way to install bandwhich on a Gnu / Linux distribution, for which there are no packages available, is download the precompiled binary. We can do this from the releases page on GitHub. Then we will have to extract the file to make it executable and only with this, it will be ready to be used.

bandwhich download page

As I say, the steps to follow to have this tool will be download the binary for Gnu / Linux from the releases page and save it for example, in our Downloads folder. Then we can right click on the downloaded .tar.gz file and select Extract here. This will extract the contents of the compressed file to the same folder.

As I type these lines, the name of the downloaded file will be 'bandwhich-v0.15.0-x86_64-unknown-linux-musl.tar.gz'. After decompression, we will see that a single file called bandwhich.

If you prefer use terminal to download compressed file, you can use the terminal (Ctrl + Alt + T) and the tool wget As follows:

download from terminal

wget https://github.com/imsnif/bandwhich/releases/download/0.15.0/bandwhich-v0.15.0-x86_64-unknown-linux-musl.tar.gz

The above command will download the version 0.15, which is the last one published today. After finishing the download, we will use tar to unzip it. To do this, in the same terminal you just have to write:

tar -xzvf bandwhich-v0.15.0-x86_64-unknown-linux-musl.tar.gz

After unzipping the file, either from the graphical environment or from the terminal, we will see that a file called bandwhich. Now let's give execute permission with the command:

sudo chmod +x bandwhich

At this point, we can proceed to the installation in the system typing in terminal (Ctrl + Alt + T):

bandwhich installation

sudo install bandwhich /usr/local/bin

Once installed, from any folder we can start this tool using command:

working tool

sudo bandwhich

We can be sure of the installed version running the command:

installed version

sudo ./bandwhich -V

We will also have the possibility of consult the help of the tool, to learn more about its use, using the -h option as follows:

bandwhich help

sudo bandwhich -h

Nowadays, there are quite a few tools that users can use to be able to see what bandwidth is used on from the command line. Among them we can include iftop, nload, nethogs and others. Bandwhich is similar in some ways to many of these programs, but it also does things a little differently. Anyway, these lines only seek to show one more option. Each user must use the tool that he likes the most and that best suits what he needs to obtain the results he is looking for.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.