美文网首页
使用nethogs 查看进程网络流量

使用nethogs 查看进程网络流量

作者: bjmingyang | 来源:发表于2020-06-18 13:26 被阅读0次

    使用就非常简单了,直接运行就能查看结果.

    ~# 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
    

    指定某块网卡

    nethogs eth0
    

    自定义刷新频率

    在启动 nethogs 时使用 -d seconds 参数定义刷新频率

    nethogs -d 1 # 每秒钟刷新
    

    交互模式

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

    m: 修改网速单位
    r: 按照流量排序
    s: 按照发送流量排序
    q: 退出
    

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

    相关文章

      网友评论

          本文标题:使用nethogs 查看进程网络流量

          本文链接:https://www.haomeiwen.com/subject/fyhuxktx.html