Track bandwidth hogs on Linux
There are more than a good handful of bandwidth monitors for Linux, but most of them simply track bandwidth consumed by subnets or protocols. Which is great if you want to know how much bandwidth is being used to browse the web or for FTP. But what if you want to track usage by process?
Say, for example, you want to know how much bandwidth your streaming audio player is using up? Or how much Firefox is using? Then you can use something like NetHogs.
NetHogs is a simple command line tool that breaks down traffic by process. At this time NetHogs includes the ability to show TCP download- and upload-speed per process, both IPv4 and IPv6 support as well as ethernet and PPP logging.
On Ubuntu, NetHogs is as easy as:
sudo apt-get install nethogs
For other platforms you can download RPM and Gentoo builds from the NetHogs website.