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.
Type iftop command at tge shell prompt to display traffic:
# iftop

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 192.168.1.0/24 network:
# iftop -F 192.168.1.0/24
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 also:
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 6 comments… read them below or add one }
It is a very useful program. This commando shows I deal and the port of a single IP
iftop -P -i any -F 62.165.165.245/32
———————————
My life is
http://www.hechospiscos.com
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 192.168.0.7
this is very usefull program. Thanks..
thanks, its great
but i still have one question, can iftop change source ip (ex: 192.168.1.2 at picture above) to hostname from each pc that connected?
regrads,..
marvellous! This application is so useful. I didn’t expect it be to user friendly. :)
thanks, it works great with my wireless nic.