iftop is a real-time network troubleshooting and traffic monitoring tool. This article focuses on the installation and basic usage of iftop on CentOS cloud servers, though the instructions are applicable to other Linux distributions as well.
The CentOS official software repository does not include iftop; it requires the installation of the epel third-party software repository before installing the iftop tool. The installation command is as follows.
sudo yum install epel-release
sudo yum update
sudo yum install iftop
Once installed, running iftop requires just a single command.
sudo iftop
By default, without any parameters, iftop monitors the inbound and outbound traffic of the default network interface eth0. To monitor a different network interface, the -i option is needed. For example, to monitor the traffic on the eth1 interface, use the following command.
sudo iftop -i eth1
iftop displays all current network connections, with arrows indicating the direction of traffic flow. The last three columns show the average traffic over the last 2 seconds, 10 seconds, and 40 seconds, respectively. The bottom of the interface displays total outgoing (TX), incoming (RX), and overall traffic, presented in three different metrics: cumulative (cumm), peak, and rates.
The iftop interface is customizable, with a series of shortcut keys to adjust the display of data.
For more detailed information about iftop, please refer to the official documentation.
23-02-2024 02:02:07
22-02-2024 03:19:32
22-02-2024 03:16:03
22-02-2024 03:14:03
22-02-2024 03:11:58