Get client’s full last command (including key) from Redis

0

Redis’s client list will give you the last command issued by client. It does not give you the key that last command was issued on. What I would like to get is the list key a client is doing BLPOP on.

Is there a way to get this?

Jeremiah

Posted 2015-10-04T05:01:46.870

Reputation: 103

Answers

1

Although it would be nice to have that kind introspective functionality, it does not exist in Redis ATM. Instead you can try catching the command in-flight to understand what your client is doing.

The straightforward manner to do that is running MONITOR (from a different connection) before the client issues the BLPOP command to get that information. Note that MONITOR carries a performance impact so you should refrain from doing it in production.

Itamar Haber

Posted 2015-10-04T05:01:46.870

Reputation: 128

I was afraid of that. Thank you for your response! I'm also considering adding pub/sub message along side of the push command to bettering logging/monitoring. – Jeremiah – 2015-10-05T00:22:01.197