Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyinx/zk-sniffer
sniffer and parse zookeeper packet
https://github.com/pyinx/zk-sniffer
golang packet-analyser packet-capture sniffer traffic zookeeper
Last synced: 22 days ago
JSON representation
sniffer and parse zookeeper packet
- Host: GitHub
- URL: https://github.com/pyinx/zk-sniffer
- Owner: pyinx
- Created: 2017-02-08T11:47:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T03:50:21.000Z (over 7 years ago)
- Last Synced: 2024-08-04T09:05:40.302Z (4 months ago)
- Topics: golang, packet-analyser, packet-capture, sniffer, traffic, zookeeper
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 43
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-network-stuff - **31**星
README
## Why to do
- 需要统计zk的事物日志
- zk自带的事物日志信息太少,不够实时
- 需要统计每个请求的耗时和返回状态码
- 需要统计每个事物的请求数和QPS
- 需要统计每个node的QPS和事物操作## What is this
- zookeepr抓包工具,并把包解析成事物日志
- 满足上面的所有需求
- 便于问题定位和资源监控## How to use
```
###### read data from device
# ./zk-sniffer -port=4181 -device=eth0
###### read data from pcap file
# ./zk-sniffer -port=4181 -file=1.pcap
``````
###### output data struct
Timestamp ClientAddr ServerAddr OpType Path Zxid ReqLength RespLength Latency(ms)
```## Screenshot
![](http://wx4.sinaimg.cn/mw690/6f6a4381ly1fcjaly09eej213e0hkgxg.jpg)
## Reference
- [https://github.com/twitter/zktraffic](https://github.com/twitter/zktraffic)
- [https://github.com/phunt/zookeeper-digest](https://github.com/phunt/zookeeper-digest)
- [https://github.com/samuel/go-zookeeper](https://github.com/samuel/go-zookeeper)
- [https://github.com/xianmau/gozk](https://github.com/xianmau/gozk)