A good network administrator should be familiar with more than one tools to monitor and analyze if there is something wrong with the network she/he is responsible to.
Monitoring network bandwidth is a common task for any network administrator. There are several bandwidth monitoring tools available in Linux, starting from GUI based ones to CLI based ones. Since most CLI based tools are more powerful and require less resource system, it’s better to choose CLI based bandwidth monitoring tools rather than GUI based ones.
Here are the 5 tools that you can use to analyze and monitor your network bandwidth. Most of them require you to install first before start using.
nload is a simple tool to monitor incoming and outgoing network traffic. You will see them in the separated display on the top and bottom. It’s completely easy to use. Once typed the command on the terminal, you will get what you need. By default nload isn’t available in many Linux distros, including Ubuntu. This example will show you how to install nload in Ubuntu.
sudo apt-get install nload
Once the tool is installed, just hit the following command on your terminal.
iptraf is a ncurses-based IP LAN monitoring tool that shows individual connections and the amount of data flowing between the hosts. This tool is also unavailable by default on most Linux distros, including Ubuntu. If you are using Ubuntu, type the following command to install the tool.
sudo apt-get install iptraf
Once the tool is installed, you can start execute it by typing the following command.
vnstat is a different tool than two tools above. By default, it will be runs on the daemon once you hit the command. But you can also run the tool in the real time mode by adding the real time (-l) option. Most Linux distros don’t offer vnstat by default so you have to install it first. This is how to install vnstat on Ubuntu.
apt-get install vnstat
And below are the example of real time usage of vnstat.
vnstat -l -i wwx0c5b8f279a64
Please note, wwx0c5b8f279a64 is the interface you want to monitor. You can see your system’s network interface by typing “ifconfig” on the terminal.
You can use this tool to monitor the download and upload speed on your current network. It shows a graph of your current and past network speed in your console. Speedometer is also unavailable in most Linux distros.
apt-get install speedometer
Once the tool is installed you can use it by typing the following command
speedometer -r wwx0c5b8f279a64 -t wwx0c5b8f279a64
Please note that wwx0c5b8f279a64 is the network interface of your system. You can see your system’s network interface by executing the ifconfig command.
iftop is a CLI based tool that listens to network traffic on a given interface and shows a table of current bandwidth usage by hosts. Iftop uses the pcap library to capture the incoming and outgoing packets of the network interface. Since most Linux distros don’t offer iftop on their default tools, you have to install it first.
apt-get install iftop
Once the tool is installed you can start type the following command to run the tool.