服务器带宽异常跑满查看以及解决办法

1、首先通过sar -n DEV 1 5命令确定哪个网卡跑满。

2、使用 iftop 工具排查:安装(yum install iftop -y)查看哪个IP哪个端口来的流量大(iftop -i eth1 -P )反查对应端口进程(netstat -tunlp |grep 53139)停止进程或者通过iptables屏蔽IP,限速。

3、使用 nethogs 进行排查:安装(yum install nethogs -y)查看哪个进程占满带宽(nethogs eth1)停止对应PID进程( kill -TERM )

日志分析也可以使用 logwatch 或 awstats 等工具进行分析