Sometimes it’s hard to guess what is eating up our bandwidth the most - on a home computer with an xDSL connection, for example. We can run a lot of programs simultaneously while they can eat as much bandwidth as they want independently of their CPU usage.
Similar to top (or iotop which we recently wrote about), iftop displays the top hosts which use the most bandwidth on one of your computer's network interfaces.
To install iftop in Ubuntu / Debian:
sudo apt-get install iftop
For other distro, see here.After installation, to specify an interface on which to listen, use the -i parameter:
iftop -i wlan1
oriftop -i eth1
Pressing the h key while running will display a nice on-screen help, showing the commands that can be triggered interactively in running mode. Some other examples of key commands changing the default state: - n turns off name resolving.
- p turns on port number display.