㈠ Download and install
Preparation Environment: Yum-y Install Libpcap-devel ncurses-devel
wget http://sourceforge.net/projects/nethogs/files/nethogs/0.8/nethogs-0.8.0.tar.gz/download
tar xvzf nethogs-0.8.0.tar.gz
CD Nethogs
Make && make install
㈡ Effect
different from other statistics and monitoring network card traffic, nethogs a bit special, can monitor each process of net bandwidth usage
㈢ Use
The program requires root permissions, the default is to monitor the ETH0 network card, if there are multiple network adapters, you must specify
How to use:
Nethogs
nethogs eth1
nethogs [option] eth0 eth1
nethogs [option] eth0 eth1 ppp0
sudo/usr/sbin/nethogs eth0
Interactive control directives:
m:cycle between display modes (KB/S, KB, b, MB)
R:sort by received.
S:sort by sent.
Q:quit and return to the shell prompt.
commonly-used option:
-D delay for refresh rate.
-h Display available commands usage.
- p sniff in promiscious mode (not recommended).
-T TraceMode.
-V Prints Version info.
650) this.width=650; "src=" Http://up.2cto.com/2013/0410/20130410101605935.png "alt=" 20130410101605935.png "/>
This article is from the "Give Me Three moles" blog, please be sure to keep this source http://wushuangjay.blog.51cto.com/3125450/1559307
Monitor network usage for each Linux process with Nethogs