linux tcpdump抓包慢,tcpdump抓包故障排查记录事件1

linux 抓包故障排查记录事件1

tcpdump 简介

某个故障示例排查,curl缓慢问题

tcpdump 简介

简介

TcpDump可以将网络中传送的数据包的“头”完全截获下来提供分析。它支持针对网络层、协议、主机、网络或端口的过滤,并提供and、or、not等逻辑语句来帮助你去掉无用的信息

命令 [root@localhost ~]# tcpdump --help

tcpdump version 4.1-PRE-CVS_2012_03_26

libpcap version 1.4.0

Usage: tcpdump [-aAdDefIKlLnNOpqRStuUvxX] [ -B size ] [ -c count ]

[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]

[ -i interface ] [ -M secret ] [ -r file ]

[ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ]

[ -y datalinktype ] [ -z command ] [ -Z user ]

[ expression ]

某个故障示例排查,curl缓慢问题

故障:A机器提供web服务器,B机器curl,瞬间返回结果;C机器curl,间隔20秒后,才返回结果

排查过程:

监听A到B tcpdump ip host 172.16.133.108 and 172.16.10.68

监听A到C tcpdump ip host 172.16.133.108 and 172.16.10.72

结果得到两份tcp包,借助wireshark工具进行分析 A到B

normal.png

A到C

xdebug.png

从上述截图可以看出,问题出现在php的扩展xdebug,打开php配置文件,注释xdebug后,恢复正常访问 原因在phpxdebug调试的时候,A到B被xdebug进行了控制handle

zend_extension=xdebug.so

xdebug.default_enable = On

xdebug.collect_params = On

xdebug.remote_connect_back = On

xdebug.remote_host =

xdebug.remote_port = 9090

xdebug.remote_enable = On

xdebug.remote_handler = dbgp

xdebug.remote_log = "/tmp/xdebug.log"

@date 2015/7/19 16:27:25

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值