cpflow命令使用总结

tcpflow实际上也是一个抓包工具,这个抓包工具与tcpdump不同的是它是以流为单位显示数据内容,而tcpdump以包为单位显示数据。

我们平常会经常分析HTTP数据,用tcpflow会更便捷

具体学习大家可以man tcpflow下,网上有免费下载tcpflow软件的
http://www.circlemud.org/~jelson/software/tcpflow/

举例:
在一台负载均衡器上分析其分配状况
在负载均衡服务器上tcpflow -cp host 1.1.1.1(后端 IP)

看缓存有没有命中,那么可以在缓存服务器上tcpflow -cp host 1.1.1.1(源端IP)|grep /index.html (url的相对路径) -A 10

可以根据自己需要自己去定义过滤,用法与tcpdump类似。


tcpflow version 0.21 by Jeremy Elson < jelson@circlemud.org >

usage: tcpflow [-chpsv] [-b max_bytes] [-d debug_level] [-f max_fds]
          [-i iface] [-w file] [expression]

        -b: max number of bytes per flow to save
        -c: console print only (don't create files)
        -d: debug level; default is 1
        -f: maximum number of file descriptors to use
        -h: print this help message
        -i: network interface on which to listen
            (type "ifconfig -a" for a list of interfaces)
        -p: don't use promiscuous mode
        -r: read packets from tcpdump output file
        -s: strip non-printable characters (change to '.')
        -v: verbose operation equivalent to -d 10
expression: tcpdump-like filtering expression

See the man page for additional information.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值