独赏寒江雪 發表於 2023-5-28 00:00:00

nethogs 查看 Linux 进程的网络使用

<p>有时候我们客户会发现服务器或 VPS 网络慢,进一步发现大量带宽被占用,一些客户到这里为止就不知道怎么办了。有什么简单办法能找出哪个程序(或者进程)占用了带宽呢?Linux 监控流量的小工具不少,如 iftop, iptraf, ifstat, darkstat, bwm-ng, vnstat 等,大都是统计和监控网卡流量的。今天介绍的 NetHogs 有点特别,可以监控每个进程的网络带宽占用情况。</p>
<p>在 Ubuntu/Debian 上安装 nethogs:</p><pre class="brush:bash;toolbar:false">$ sudo apt-get install nethogs</pre><p>在 CentOS/RHEL 上安装 nethogs:</p><pre class="brush:bash;toolbar:false"># yum install nethogs</pre><p>运行 nethogs:</p><pre class="brush:bash;toolbar:false"># nethogs
# nethogs eth0</pre><p><img src="https://zhuji.jb51.net/uploads/img/20230517/8edeae1f368066bacb37f82cc24819b7.jpg" width="1024" height="189"></p>
頁: [1]
查看完整版本: nethogs 查看 Linux 进程的网络使用