Ubuntuにnthlogsをインストールして、各プロセスを使うトラフィックを調べる

1.nethogsをインストール

# yum install nethogs libpcap-dev libpcap
2.nethogsの使い方
[root@ip-172-31-27-223 ~]# nethogs -h
usage: nethogs [-V] [-b] [-d seconds] [-t] [-p] [device [device [device …]]]
-V : prints version.
-d : delay for update refresh rate in seconds. default is 1.
-t : tracemode.
-b : bughunt mode – implies tracemode.
-p : sniff in promiscious mode (not recommended).
device : device(s) to monitor. default is eth0

When nethogs is running, press:
q: quit
m: switch between total and kb/s mode

3.操作例
nethogs eth0 eth1 -t

Linux

Posted by arkgame