iftop – A Real Time Linux Network Bandwidth Monitoring Tool

In our earlier article, we have reviewed the usage of TOP Command and it’s parameters. In this article we have came up with another excellent program called Interface TOP(IFTOP) is a real time console-based network bandwidth monitoring tool.

It will show a quick overview of network activities on an interface. Iftop shows a real time updated list of network usage bandwidth every 2, 10 and 40 seconds on average. In this post we are going to see the installation and how to use IFTOP with examples in Linux.

Requirements:

libpcap : library for capturing live network data.

libncurses : a programming library that provides an API for building text-based interfaces in a terminal-independent way.

Install libpcap and libncurses

First start by installing libpcap and libncurses libraries using your Linux distribution package manager as shown.

Monitor Linux Network Interface

Then use the -i flag to specify the interface you want to monitor. For example the command below used to monitor bandwidth on the wireless interface on the test computer.

$ sudo iftop -i wlp2s0

Monitor Linux Wifi Network Bandwidth

To disable hostname lookups, use the -n flag.

$ sudo iftop -n eth0

To turn on port display, use the -P switch.

$ sudo iftop -P eth0

Iftop Options and Usage

While running iftop you can use the keys like S, D to see more information like source, destination etc. Please do run man iftop if you want to explore more options and tricks. Press ‘q‘ to quit from running windows.

In this article, we’ve showed how to install and use iftop, a network interface monitoring tool in Linux. If you want to know more about iftop please visit iftop website. Kindly share it and send your comment through our comment box below.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

I configured firewalld with zone work and added sources (our internal/external IP address) , restarted services , in IFTOP I can see different (strange) IP(DNS) connections . how I can disable this traffic/connection please ? Thank you .

Hi Ravi , please I have a question, do you think that the traffic could be applied for a specific website ? for example, the user have 500 Kb/s for the download and 300Kb/s for the upload when he connect to zippyshare.com ( for exple) , and have the full speed when he connect to other websites ?