Linux网络监控具体方法:
-
查看网卡信息,带宽信息
[root@workip ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s #这里代表是1000M口 Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: d Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes12345678910111213141516171819202122232425
下面的这些工具都可以通过yum install XXX来安装,如果安装失败,检查一下yum库,更新一下。我用的是aly的库 \2. nload可以查看实时的流量信息
-
使用iftop可以查看不同机器之间流量排行
-
iptraf这个功能看起来很强大,后续研究一下
-
可以直接使用命令查看tcp连接数
#netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' TIME_WAIT 593 SYN_SENT 30 ESTABLISHED 39 CLOSING 212345
只看连接数
#netstat -nat|grep ESTABLISHED|wc -l 1164
以上就是
为各位朋友分享的 相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多 等着你!