iftop is a network bandwidth monitoring utility that can be used to diagnose network performance degradation in real time.
In this tutorial, we will be covering the the installation and basic usage of
iftop on CentOS 6. This article can be used as a reference for other RPM-based Linux distributions.
iftop is not available in the base CentOS yum repository, it is however available in the
epel repository. Therefore, we will need to install
epel in order to install
sudo yum install epel-release sudo yum update sudo yum install iftop
Without additional parameters,
iftop will monitor all the inbound and outbound traffic on the default network interface. e.g.
To monitor a different network interface, e.g.
eth1, you would need to pass the interface name to the
iftop command using the
sudo iftop -i eth1
On the top of the screen is a scale which is used to indicate the bandwidth usage of each network connection listed below.
The information on the top of the screen indicates the bandwidth each network connection is consuming.
In the center, a list of all network connections on the monitored interface is displayed. The arrow at the end of each line indicates whether the traffic is inbound or outbound.
The last three columns show the average bandwidth usage for each connection during the last 2, 10, and 40 seconds.
The section at the bottom of the screen displays the overall traffic statistics including transmitted traffic
Tx, received traffic
Rx, and the grand total
iftop provides the cumulative bandwidth usage (
cum) for each type of traffic, the peak bandwidth usage (
peak), and the average bandwidth usage during the last 2, 10, and 40 seconds.
iftop's interface is rather customizable. Using a set of predefined keys, you can alter the way in which data is displayed:
This concludes our tutorial. For more information on how to use
iftop, please refer to iftop's website.
Thank you for reading.