4

是否有一种编程方式可以通过一些 REST 或 Groovy API以编程方式获取keyspace_hits和值?keyspace_miss

4

2 回答 2

9

您可以通过普通的 Redis 接口以编程方式获取这些统计信息:

> INFO
...
keyspace_hits:414197256
keyspace_misses:661663278
...

有关更多信息,请参阅INFO 命令文档。

Redis 不会说 HTTP;它只讲 Redis 协议。如果需要,您可以将webdis放在前面。

于 2012-10-11T16:17:33.740 回答
1

You can usually get all the info you need from just connecting to the server with any redis client.

You can get all the info by using this command Info.

There is an interesting article here that the Author shows how to trace gets and sets and messing around with the redis source code.

There is some third party tools that lets you monitor redis a quick google search you give you a few like this one. (I am not endorsing them it is just an example).

There is also the monitor command in redis that shows you everything as it happens which you could make your own monitoring app.

于 2012-10-11T16:23:18.703 回答