网卡流量很高,有波动,把带宽跑满了,这时候能够用一下抓包工具。windows
tcpdump tcp
安装 :yum install -y tcpdumpide
查看数据流工具
[root@wy ~]# tcpdump -nnspa
说明:-nn 以数字的形式显示ip和端口号ip
指定抓包的数量 -cit
[root@wy ~]# tcpdump -nn -c 100class
注:最主要看的就是来源ip到目标ip,若发现网卡有点堵塞,跑满了,可能抓包的时候会发现,某一个端口到某一个端口的数据包不少,并且大多都同样,那么可能被***了。request
指定网卡 -iim
[root@wy ~]# tcpdump -nn -i eth0
指定端口 port
[root@wy ~]# tcpdump -nn port 22
指定协议
[root@wy ~]# tcpdump -nn tcp and port 22
指定Ip
[root@wy ~]# tcpdump -nn tcp and port 22 and host 192.168.219.128
把抓到的包写入文件里 -w
[root@wy ~]# tcpdump -nn tcp and port 22 and host 192.168.219.128 -w 1.cap
查看包里的具体流向 -r (但并非包里具体的内容)
[root@wy ~]# tcpdump -r 1.cap
抓完整的包 -s0
[root@wy ~]# tcpdump -nn -s0 tcp and port 22 -c 10 -w 1.cap
tshark windows下也能够使用
安装:yum install -y wireshark
说明:tshark -nn跟tcpdump -nn差很少,它的功能比tcpdump强大一些。
记住这条经常使用的命令,能够更直观详细的查看:
tshark -n -t a -R http.request -T fields -e "frame.time" -e "ip.src" -e "http.host" -e "http.request.method"
-e "http.request.uri"