Real time monitor linux network and bandwidth using Iftop

Iftop Network Monitoring

Sometimes we need to monitor bandwidth and analyst network usage on server.

There are many tools to do this. The simplest and fast tools is only using command line on Linux.

Iftop is one of simplest tool but power full to monitoring your server bandwidth usage.

You can see highest request, transfer and receive bandwidth in real time.

It’s just like top, htop or iostat.

How to install Iftop

Install Epel repository, update and install required dependencies

## Centos / RHEL 6 / 7
# yum install epel-release
# yum update
# yum install libpcap libpcap-devel ncurses ncurses-devel
# yum install iftop
## Centos / RHEL 8 / Fedora 22+
# dnf install iftop
## Ubuntu / Debian
# sudo apt-get install iftop

How to use Iftop

Basic usage of Iftop, just run command iftop, this will monitoring all interfaces, will do hostname look up, so IP address will converted to hostname.

# iftop

If you want to turn off hostname lookup use this command:

# iftop -n
Iftop Network Monitoring Without Hostname Lookup
Iftop Network Monitoring Without Hostname Lookup

To monitor on specific interface, use option -i. Use command ifconfig to see you network interfaces.

# ifconfig
# iftop -i enp4s0 -n

Leave a Reply

Your email address will not be published.