標籤:between linux display 監控 下載安裝
㈠ 下載安裝
準備環境: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
㈡ 作用
有別於其他統計和監控網卡流量、NetHogs 有點特別、可以監控每個進程的網路頻寬佔用情況
㈢ 使用
該程式需要 root 許可權,預設是監控 eth0 網卡 ,如果有多網卡的話就必須進行指定
使用方法:
nethogs
nethogs eth1
nethogs [option] eth0 eth1
nethogs [option] eth0 eth1 ppp0
sudo /usr/sbin/nethogs eth0
互動式控制指令:
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.
常用的 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" />
本文出自 “給我三顆痣” 部落格,請務必保留此出處http://wushuangjay.blog.51cto.com/3125450/1559307
用NetHogs監控Linux每個進程的網路使用方式