redis-traffic-stats - Redis query analyzer for counting, traffic stats by command
redis-traffic-stats -r pcapfile [-n top_n] [-p port]
A) Analyze existing pcap file (RECOMMENDED WAY)
# tcpdump -s 65535 tcp port 6379 -w redis.pcap -i eth0 (wait for a while and stop by ^C) $ redis-traffic-stats -r redis.pcap
redis-traffic-stats [-n top_n] [-p port] [-i device] [-c count_capture] [-t time_capture]
B) Capture packets on demand and analyze it
Capture 5000 packets # redis-traffic-stats -i eth0 -c 5000 Capture for 10 sec # redis-traffic-stats -i eth0 -t 10
redis-traffic-stats -h | --help | -?
Show detailed usage
redis-traffic-stats is a query analyzer for Redis.
The output looks as follows:
Read existing pcap file instead of on demand packet capturing.
# tcpdump -s 65535 tcp port 6379 -w redis.pcap -i eth0
Target port of analyze. Default is 6379.
Show top N keys in "Command Detail" section. Default is 10.
Network interface name used by -i option of tcpdump. Default is no -i option (lowest numbered interface excluding loopback device).
This option has a point only in on demand packet capture mode.
tcpdump will exit after captured number of this option packets. Default is 10000.
tcpdump will exit after number of this option seconds.
increase debug level. -d -d more verbosely.
https://github.com/hirose31/redis-traffic-stats
HIROSE Masaaki <hirose31@gmail.com>
To install App::redis_traffic_stats, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::redis_traffic_stats
CPAN shell
perl -MCPAN -e shell install App::redis_traffic_stats
For more information on module installation, please visit the detailed CPAN module installation guide.