redis-faina

A query analyzer that parses Redis' MONITOR command for counter/timing stats about query patterns

  • 所有者: facebookarchive/redis-faina
  • 平台:
  • 许可证: BSD 2-Clause "Simplified" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

redis-faina

A query analyzer that parses Redis' MONITOR command for counter/timing stats about query patterns

At its core, redis-faina uses the Redis MONITOR command, which echoes every single command (with arguments) sent to a Redis instance. It parses these
entries, and aggregates stats on the most commonly-hit keys, the queries that took up the most amount of time, and the most common key prefixes
as well.

Usage is simple:

# reading from stdin
redis-cli -p 6490 MONITOR, head -n <NUMBER OF LINES TO ANALYZE>, ./redis-faina.py [options]

# reading a file
redis-cli -p 6490 MONITOR, head -n <...> > /tmp/outfile.txt
./redis-faina.py [options] /tmp/outfile.txt

	options:
--prefix-delimiter=...         	String to split on for delimiting prefix and rest of key, if not provided `:` is the default . --prefix-delimiter=#
--redis-version=...       			  Version of the redis server being monitored, if not provided `2.6` is the default. e.g. --redis-version=2.4

The output (anonymized below with 'zzz's) looks as follows:

One caveat on timing: MONITOR only shows the time a command completed, not when it started. On a very busy Redis server (like most of ours), this is
fine because there's always a request waiting to execute, but if you're at a lesser rate of requests, the time taken will not be accurate.

Have more stats / improvements you'd like to see to Redis-Faina? Please fork and send pull requests! And if analyzing hundreds of thousands of requests per second
across many systems is interesting to you, drop us a note and tell us a bit about yourself--we're building out our dev & devops team

主要指标

概览
名称与所有者facebookarchive/redis-faina
主编程语言Python
编程语言Python (语言数: 2)
平台
许可证BSD 2-Clause "Simplified" License
所有者活动
创建于2012-05-15 23:08:27
推送于2020-03-05 22:52:51
最后一次提交2012-12-13 16:43:34
发布数0
用户参与
星数1.8k
关注者数101
派生数280
提交数18
已启用问题?
问题数0
打开的问题数0
拉请求数3
打开的拉请求数2
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?