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

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

  • tcpdump 简介
  • 某个故障示例排查,curl缓慢问题

tcpdump 简介

  • 简介php

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

  • 命令linux

    [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秒后,才返回结果web

排查过程:express

  1. 监听A到B tcpdump ip host 172.16.133.108 and 172.16.10.68
  2. 监听A到C tcpdump ip host 172.16.133.108 and 172.16.10.72

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

A到C 分析图网络

从上述截图能够看出,问题出如今php的扩展xdebug,打开php配置文件,注释xdebug后,恢复正常访问 缘由在phpxdebug调试的时候,A到B被xdebug进行了控制handlecurl

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"

@author 詹巨章 zhanjuzhang@gmail.comtcp

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

相关文章
相关标签/搜索