Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining keyspace hit and miss from Redis

Is there a programmatic way to obtain the keyspace_hits and keyspace_miss values programmatically through some REST or Groovy API?

like image 835
wsb3383 Avatar asked Dec 26 '22 16:12

wsb3383


2 Answers

You can get these stats programmatically through the normal Redis interface:

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

See the INFO command documentation for more.

Redis doesn't speak HTTP; it only speaks the Redis protocol. You could put webdis in front if required.

like image 115
willglynn Avatar answered Dec 29 '22 05:12

willglynn


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.

like image 41
dmportella Avatar answered Dec 29 '22 05:12

dmportella