Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

How-To: find which program consumes your bandwidth with nethogs

Posted by chantra on March 29th, 2013

Let's continue the network monitoring serie with yet another use case.... the "What program is using my bandwidth?" problem while not imposible to solve, still remains a pain. What if there were some kind of top for network?

NetHogs is a nifty tool that will do that for you and will help you finding what is hogging your connection.

Like most network monitoring programs, nethogs relies on libpcap to sniff the network, which means that the program needs to be run with root privileges.

Installation

There is a deb packages on debian repositories, so installing nethogs is as straight as:

# apt-get install nethogs

Now you should be good to run nethogs

Usage

nethogsWhen running nethogs, you can specify the interfaces you want to monitor the traffic on. By default, it will use eth0.

# nethogs eth0

Is all you need to get running. Once the program is running, you can use the key m to switch between 2 modes:

  • kb/s
  • total usage

The application is pretty simple and have limited feature, but it gets the job done.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>