dropwatch 工具分析网络丢包

2022-08-25 03:18:04 浏览数 (2)

安装

代码语言:shell复制
yum install dropwatch -y 

两条命令

代码语言:shell复制
[root@VM-80-27-centos ~]# dropwatch -l kas   # 命令1
Initalizing kallsyms db
dropwatch> start  # 命令2
Enabling monitoring...
Kernel monitoring activated.
Issue Ctrl-C to stop monitoring
1 drops at skb_queue_purge 18 (0xffffffff92a42868)
........

案例一

iptables 导致丢包,可以通过 是否有 nf_hook *** 之类的返回结果来判断

代码语言:shell复制
[root@VM-80-27-centos ~]# 
[root@VM-80-27-centos ~]# dropwatch -l kas
Initalizing kallsyms db
dropwatch> start
Enabling monitoring...
Kernel monitoring activated.
Issue Ctrl-C to stop monitoring
1 drops at skb_queue_purge 18 (0xffffffff92a42868)
2 drops at unix_dgram_sendmsg 4f8 (0xffffffff92b1b168)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
6 drops at nf_hook_slow f3 (0xffffffff92a99be3)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
4 drops at nf_hook_slow f3 (0xffffffff92a99be3)
2 drops at nf_hook_slow f3 (0xffffffff92a99be3)
1 drops at unix_dgram_sendmsg 4f8 (0xffffffff92b1b168)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
2 drops at nf_hook_slow f3 (0xffffffff92a99be3)
2 drops at unix_stream_connect 2da (0xffffffff92b1b95a)
1 drops at unix_dgram_sendmsg 4f8 (0xffffffff92b1b168)
1 drops at unix_dgram_sendmsg 4f8 (0xffffffff92b1b168)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
4 drops at nf_hook_slow f3 (0xffffffff92a99be3)
1 drops at nf_hook_slow f3 (0xffffffff92a99be3)
2 drops at nf_hook_slow f3 (0xffffffff92a99be3)
^CWaiting for deactivation ack...
Got a stop message
dropwatch> 

0 人点赞