使用nethogs 查看進程網(wǎng)絡(luò)流量

使用就非常簡單了,直接運行就能查看結(jié)果.

~# nethogs
NetHogs version 0.8.5

  PID USER     PROGRAM                      DEV        SENT      RECEIVED
2214  root     /usr/lib/apt/methods/http    eth0       4.693     238.631 KB/sec
2051  ubuntu   sshd: ubuntu@pts/1           eth0       3.442       0.310 KB/sec
1120  ubuntu   sshd: ubuntu@pts/0           eth0       0.416       0.035 KB/sec
2213  root     /usr/lib/apt/methods/http    eth0       0.021       0.023 KB/sec
?     root     unknown TCP                             0.000       0.000 KB/sec

  TOTAL                                                8.572     239.000 KB/sec

指定某塊網(wǎng)卡

nethogs eth0

自定義刷新頻率

在啟動 nethogs 時使用 -d seconds 參數(shù)定義刷新頻率

nethogs -d 1 # 每秒鐘刷新

交互模式

在進入 nethogs 之后,可以使用如下的交互命令:

m: 修改網(wǎng)速單位
r: 按照流量排序
s: 按照發(fā)送流量排序
q: 退出

引用自
http://einverne.github.io/post/2017/07/use-nethogs-to-check-network-traffic-per-process.html

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容