开源:hint - 中文 Markdown 格式检查,可以集成 Travis CI
yulm0781
8年前
<h2>Why to do</h2> <ul> <li>需要统计zk的事物日志</li> <li>zk自带的事物日志信息太少,不够实时</li> <li>需要统计每个请求的耗时和返回状态码</li> <li>需要统计每个事物的请求数和QPS</li> <li>需要统计每个node的QPS和事物操作</li> </ul> <h2>What is this</h2> <ul> <li>zookeepr抓包工具,并把包解析成事物日志</li> <li>满足上面的所有需求</li> <li>便于问题定位和资源监控</li> </ul> <h2>How to use</h2> <pre> ###### read data from device # ./zk-sniffer -port=4181 -device=eth0 ###### read data from pcap file # ./zk-sniffer -port=4181 -file=1.pcap</pre> <pre> ###### output data struct Timestamp ClientAddr ServerAddr OpType Path Zxid ReqLength RespLength Latency</pre> <h2>Screenshot</h2> <p style="text-align: center;"><img src="https://simg.open-open.com/show/c30b5351f173165948fcb3a50c5cfb95.jpg"></p> <h2>Reference</h2> <ul> <li><a href="/misc/goto?guid=4959736728283566584" rel="nofollow,noindex">https://github.com/推ter/zktraffic</a></li> <li><a href="/misc/goto?guid=4959736728372343200" rel="nofollow,noindex">https://github.com/samuel/go-zookeeper</a></li> </ul> <p> </p> <p> </p> <p> </p>