zoukankan      html  css  js  c++  java
  • TCP Traffic Analyzer

    TCP Traffic Analyzer 工具
    yahoo 发布的一款开源网络分析工具,可以分析网络应用在服务器端与客户端之间的运行状态
    Yconalyzer保持与tcpdump兼容,两者生成的抓取文件能够彼此识别和分析。Yconalyzer支持tcpdump的所有过滤条件,并适用于TCP协议之上的所有网络协议,如HTTP、SMTP、POP、IMAP等等。


    能做的几点
    1、持续时间超过(或者小于)某阈值(或在某个区间内)的TCP连接数。
    2、尝试次数超过N次才成功的TCP连接数。
    3、TCP连接持续时间和吞吐量的分布情况。
    4、数据包超过N字节的TCP连接分布情况。 -Y
    5、持续时间在特定阈值内的IP地址和端口分布情况。 -D 区间开始值


    Yconalyzer会根据不同的选项显示出不同的分析结果


    下载、安装
    yum install *pcap* 基于pcap库
    wget http://nchc.dl.sourceforge.net/project/yconalyzer/yconalyzer-1.0.4.tar.bz2
    tar -xvf yconalyzer-1.0.4.tar.bz2
    ./configure </dir>
    gmake && gmake install

    命令参数:使用时必带参数 -p 端口号


    等价的命令:
    tcpdump -w http.pcap '(tcp port 80)&&((tcp[tcpflags] & (tcp-syn|tcp-fin|tcp-rst)) != 0)'

    yconalyzer -w http.pcap -p 80


    -d: Debug on (default off) 实时输出
    -c: 打印尝试次数超过指定次数才成功的连接 Print connections that took >= num_attempts to establish
    -R: 原始格式输出分布 Raw format output. Useful for scripts
    -r: 从文件读取数据而不是从接口实时读 Data is read from file instead of live interface
    -w: 数据保存到文件中 Data is written to a file.
    -i: 接口 Interface name (default is ethernet interface)
    -n: 显示多少个区间 Number of buckets for getting the distribution. Default 20
    -s: 区间大小 Bucket size (connection life time). Default 20ms
    -t: 抓包运行时间 ms Run time in seconds (default 60)

    -X: 只显示服务器端发送的数据小于 N bytes 的连接.
    -Y: 只显示服务器端发送的数据大于 N bytes 的连接

    -x: 只显示客户端发送的数据小于 N bytes 的连接
    -y: 只显示客户端发送的数据大于 N bytes 的连接

    仅仅指定 -x 或 -X 也可以
    Only one of -x or -X can be specified
    -T: Attempt to estimate round trip time 预估每个连接的 RTT,
    Estimates may be wrong if the command is run on the server side. See man page.

    -D: 打印出指定区间中的IP及端口号,从文件读取时有效。 Print connection filters for the bucket starting with this value


    -p: 要监控的端口号,必须指定。 port number you want to monitor. Must be specified

    -I: 在指定时间之前不抓取数据,指定时间之后才抓取连接 Consider pkts newer than this time. Specify in HH:MM:SS or YYYY-MM-DD.HH:MM:SS format
    -P 以吞吐量区间输出分布(KB/s) for sorting the output by throughput
    -C 以客户端发送大小为区间输出分布(KB) for sorting the output by number of bytes sent by client
    -S 以服务器端发送大小为区间输出分布(KB) for sorting the output by number of bytes sent by server


    Total Connections (terminated by FIN) 完整流从开始到结束,
    连接总数 (通过 FIN 标记终止的)

    客户端平均发送bytes
    Avg Client Data

    服务器端平均发送bytes
    Avg Server Data

    所有连接平均持续时间
    Avg conn duration

    平均 RTT
    Avg Round Trip Time

    SYN 总数 求证过
    Total number of SYNs

    Connections terminated by RESET
    连接被 RESET 重置的数量

    Number of SYNs taken to establish connections
    拿 SYN 建立连接的数量

    Number of unique connections dropped by the server
    通过服务器丢弃的唯一连接 的数量

    Number of SYNs from incomplete connections
    不完整的连接的 SYN 的数量

    Number of established connections in progress:0 (0 may have been discarded by the client)
    正在建立连接的数量 (可能由客户端丢弃的)

    Number of connections in closing state
    closing 状态下的连接数量

    Distribution of SYNs to establsh connections (nSYNs:nConns): 1:46,
    尝试次数跟已建立连接 的分布情况 : 尝试次数:已建立的连接

  • 相关阅读:
    Android Market google play store帐号注册方法流程 及发布应用注意事项【转载】
    cocos2d-x 调用第三方so文件
    ios cocos2d-x 多点触摸
    linux文件分割(将大的日志文件分割成小的)
    Linux 统计某个字符串出现的次数
    scapy基础-网络数据包结构
    mac 下idea光标问题
    mac ox终端显示 bogon的问题
    hibernate和mybatis的区别
    memcached知识点梳理
  • 原文地址:https://www.cnblogs.com/zimufeng/p/6857685.html
Copyright © 2011-2022 走看看