Have you ever been messing around on your Ubuntu box, only to notice some sluggishness or some suspicious spikes in your internet connection, and wondered, “What the hell is using up all that bandwidth?” Or worse, “Have I been hacked?” If so, then NetHogs might be the program for you.
NetHogs is a lightweight Linux terminal-based tool that monitors bandwidth usage, then groups it by process, so you can see which PIDs are using the most bandwidth, and if necessary, kill them with System Monitor.
To install NetHogs on Ubuntu (tested on 9.10 Karmic), you can either use Synaptic or simply apt-get, like so:
sudo apt-get install nethogs
To run NetHogs, simply feed it the internet connection you wish to examine, and sit back.
sudo nethogs eth0
For more information and the full list of options, visit the NetHogs man page.
man nethogs

