歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 用 NetHogs 監控 Linux 每個進程的網絡使用情況

用 NetHogs 監控 Linux 每個進程的網絡使用情況

日期:2017/2/28 14:50:27   编辑:Linux教程

用 NetHogs 監控 Linux 每個進程的網絡使用情況

㈠ 下載

nethogs-0.8.0.tar.gz

安裝之前、可能需要先 yum install ncurses*

㈡ 作用

有別於其他統計和監控網卡流量、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.

Copyright © Linux教程網 All Rights Reserved