Last updated on November 22, 2020 by Dan Nanni
iftop
is a command line tool that shows a list of active network connections between local host and any remote host, sorted by their bandwidth usage. The list of top-ranking network connections (in terms of bandwidth usage) is periodically refreshed in an ncurses
-based user interface. Using iftop
, you can visually check the bidirectional bandwidth usage of different network connections in real time. In order to install iftop
on Linux, follow the instructions below.
iftop
on Ubuntu, Debian or Linux Mint$ sudo apt-get install iftop
iftop
on CentOS or RHELTo install iftop
on a RHEL-based system, first set up Repoforge repository, and then run the following command.
$ sudo yum install iftop
iftop
on FedoraTo install iftop
on Fedora, simply run:
$ sudo yum install iftop
iftop
from the source on CentOS, RHEL or FedoraIf you would like to build and install the latest version of iftop
manually, do the following.
$ sudo yum -y install ncurses-devel libpcap-devel $ wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz $ tar xvfvz iftop-0.17.tar.gz $ cd iftop-0.17 $ ./configure $ make $ sudo make install
iftop
To monitor network traffic received on a specific network interface (e.g., eth0
) with iftop
, run the following command.
$ sudo iftop -i eth0
iftop
supports rudimentary packet filtering rules with -f
option. For example:
$ sudo iftop -i eth0 -f 'port domain'
$ sudo iftop -i eth0 -f 'port http'
$ sudo iftop -i eth0 -f 'port http and not host 192.168.10.130'
$ sudo iftop -i eth0 -f 'not ether host ff:ff:ff:ff:ff:ff'
$ sudo iftop -i eth0 -f 'icmp'
The screenshot of iftop
looks as follows.
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean