How to Setup NetHogs – Monitor Bandwidth Usage Per Process in Linux

Share this Article :

NetHogs is a opensource tools to monitor network bandwidth that was used by the process and program in linux operating system. NetHogs does not rely on a special kernel module to be loaded. When you hit the high network traffic issue on your linux server, you can immediately find which PID is causing the issue. NetHogs will give you real time statistics of your network bandwidth of per process usage. Follow this steps to install NetHogs on linux CentOS 6.5 and the sample nethogs usage.

Also Read :   How to Enable the root Login on Ubuntu 11.10

1. Prepare additional repository (EPEL repository).

2. Install nethogs :

[[email protected] ~]# yum install nethogs -y

3. NetHogs utility :

[[email protected] ~]# nethogs

Sample output :
setup nethogs -1

4. NetHogs command option :
There are a few commad options when using nethogs. Using ‘-d‘ to add a refresh rate. As an example, to set 5 seconds as your refresh rate, then type the command as.

[[email protected] ~]# nethogs -d 5

Other options :

-d     delay for refresh rate.
-h     display available commands usage.
-p     sniff in promiscious mode (not recommended).
-t     tracemode.
-V     prints Version info.

5. Monitor specific device (eth0 or eth1) network bandwidth only :

Also Read :   How to Uninstall Webmin on CentOS 6.3

a) Monitor eth0 bandwidth :

[[email protected] ~]# nethogs eth0

a) Monitor eth0 and eth1 bandwidth :

[[email protected] ~]# nethogs eth0 eth1

Reference :

Leave a Reply