Monitor Per Process Network Bandwidth Usage with Nethogs
NetHogs is an open-source, small ‘net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded.
If there’s suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to identify programs that have gone wild and are suddenly taking up your bandwidth.
On RHEL/CentOS, NetHogs is not available in official RHEL/CentOS repositories, so let us add EPEL repository to install NetHogs:
[root@server ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Install NetHags using the following command:
[root@server ~]# yum install nethogs -y
sk@sk:~$ sudo apt-get install nethogs
Open up the terminal and enter the following command:
sk@sk:~$ sudo nethogs
By default, NetHogs listens to eth0 interface and displays the bandwidth consumption of the processes. As you see above, the SENT and RECEIVED columns shows the amount of traffic being used around per process. The total bandwidth usage is shown in the TOTAL column.
To cycle between bandwidth usage units, hit “m” (Available units: KB/sec, KB, B, MB). To sort by “sent” traffic or “received” traffic, hit “s” or “r” respectively. You can quit nethogs by hitting “q”.
To listen a particular interface, for example eth1, enter the following command:
sk@sk:~$ sudo nethogs eth1
To monitor bandwidth usage of eth1 interface only, use the following command:
sk@sk:~$ sudo nethogs -device eth1
Also you can set refresh intervals use the parameter -d along with number of seconds.
For example, to set the refresh interval every 5 seconds, enter the following command:
sk@sk:~$ sudo nethogs -d 5
For more information about NetHogs refer the man pages:
sk@sk:~$ man nethogs
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- How To Show Username On Panel In Ubuntu 13.04/13.10 : By default usernames are not displayed on panel in Ubuntu 13.04 and 13.10, In this simple tutorial w...0 comments |
- Setup DNS Server On openSUSE 13.1 : What is DNS Server? As you might know, DNS, Domain Name System, is a system that resolves Domain ...0 comments |
- cowsay And fortune Combined Together : Hi linux geeks! In this article I will teach you a nice trick you can perform in the terminal with ...0 comments |
- cowsay And fortune Combined Together
- How To Show Username On Panel In Ubuntu 13.04/13.10
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .