Iftop stands for Interface Top. Iftop is a tool which is used for network bandwidth monitoring. With the iftop tool you can find out the bandwidth usage.
and the real time network activities. You can quickly judge the flow of the network traffic. I would love to recommend this tool to every System admin who has to measure the network traffic and bandwidth usage. This is one of the best bandwidth monitor tool I would say. Apart from that iftop is very easy to use, it displays the output of bandwidth usage and network traffic in a table.
Summary of what you can know with iftop
- Network monitor
- Bandwidth Monitor
- Cause of network congestion.
- Bandwidth usage
- Flow of traffic in specific interface
iftop is not installed by default in many Linux distro. To install iftop in CentOS use the below command.
# yum install iftop
To install iftop in Debian and Ubuntu based system use the below command.
# apt-get install iftop
If the iftop package is not available you can simply download it with the wget command. Copy the command along with path and paste it on your terminal and run.
# wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz
Now extract the package with the tar command and run as given below.
# tar -xvf iftop-0.17.tar.gz # cd iftop-0.17 # ./configure # make # make install
Learn how to use wget with Linux wget examples tutorial
Iftop rpm source
To download the iftop tool from the latest iftop rpm sources go to this link Download RPM sources . You can download the iftop rpm from here depending on your Linux distribution.
How to use iftop
Iftop is very to use, you just need to type the command on the terminal provided that the iftop is already installed. Below is the screen shot of the display of the output.
Using -i option with iftop
Your may be using more than one interface in your computer system. You can use -i option with iftop to monitor bandwidth usage of specific interface.
# iftop -i eth0
More options you can use with iftop
There are many options available that you can use with iftop command for network and bandwidth monitoring in Linux. With the help of these your output will become more productive.
The below are some of the options that you can use while using iftop.
-h = This will print the network bandwidth usage summary.
-n = It won't do hostname lookup
-N = It doesn't resolve port number to service names
-p = It displays all the interface even if the network traffic is not passing through any interface.
-P = This will turn on the port display.
-B = It displays bandwidth rates in bytes/sec
For more options type man iftop on the terminal to read the man page for iftop.
# man iftop
Image credit: Felix Triller
That's it about How to use iftop the best bandwidth monitor tool in Linux.Any queries regarding the iftop tool or any command please feel free to comment.