≡ Menu

Linux Display Bandwidth Usage on Network Interface By Host

The iftop command listens to network traffic on a named network interface, or on the first interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts. iftop is a perfect tool for remote Linux server over ssh session.

iftop must be run by the root or the user who has sufficient permissions to monitor all network traffic on the network interface. See how to install iftop on CentOS/RHEL based server.

Type iftop command at the shell prompt to display traffic:
# iftop
Sample outputs:

However, iftop works best when you use filters. For example, if you want to find out how much bandwidth users are wasting or trying to figure out why the network is slow,
# iftop -f icmp

You can display or analyses packet flowing in and out of the network:
# iftop -F

Disable output for DNS traffic by using filter code such as:
# iftop -f 'not port domain'

iftop has many options read man page for further information see its man page – iftop(8)

See also:
Share this on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 7 comments… add one }
  • Anonymous September 7, 2006, 1:11 pm

    It is a very useful program. This commando shows I deal and the port of a single IP

    iftop -P -i any -F

  • Artem Nosulchik October 19, 2007, 11:32 am

    It’s also possible to apply filter when iftop is already running: just press “f” button and type filter you wish like:
    Net filter> host

  • ahmbay August 29, 2009, 9:36 am

    this is very usefull program. Thanks..

  • alfin September 10, 2009, 8:33 pm

    thanks, its great
    but i still have one question, can iftop change source ip (ex: at picture above) to hostname from each pc that connected?


  • Penton October 14, 2009, 4:50 am

    marvellous! This application is so useful. I didn’t expect it be to user friendly. :)

  • blogger February 13, 2012, 1:44 am

    thanks, it works great with my wireless nic.

  • Pluto April 17, 2014, 4:49 am

    Something that works well via command line (especially for SSH) is iptraf. That lets you view stats with a wide variety of detail. Probably doesn’t work as well as this, but it works well enough ;)

Security: Are you a robot or human?

Leave a Comment

   Tagged with: , , , , , , , , , ,