有时候我们需要查看是什么进程占用带宽,可以用nethogs或者iftop命令查看:
nethogs命令:
yum -y install libpcap-devel ncurses-devel wget -c https://github.com/raboof/nethogs/archive/v0.8.1.tar.gz tar xvzf v0.8.1.tar.gz cd nethogs-0.8.1 make && make install
使用方法:
nethogs 或 nethogs eth0
Sent表示出服务器的带宽 Received表示进服务器的带宽
iftop命令:
yum -y install iftop
使用方法:
iftop 或者iftop -i eth0
TX:发送流量 RX:接收流量
-------------------------------分割线---------------------------------------
如果要查看出口带宽使用情况可以使用vnstat命令
wget downinfo.myhostadmin.net/vnstat-1.10.tar.gz tar xzvf vnstat-1.10.tar.gz cd vnstat-1.10 make && make install
具体命令:
vnstat -l -i eth0 查看实时流量
vnstat –tr –i eth0 查看最近五秒的平均流量
Rx 接收的数据量 Tx 发送的数据量
» 本文链接地址:https://blog.mydns.vip/2626.html
最新评论
正需要比对工具
很好的解决办法