The Redis Slow Log is a system to log queries that exceeded a specified execution time. The execution time does not include I/O operations like talking with the client, sending the reply and so forth, but just the time needed to actually execute the command (this is the only stage of command execution where the thread is blocked and cannot serve other requests in the meantime). You can configure the slow log with two parameters: slowloglog-slower-than tells Redis what is the execution time, in microseconds, to exceed in order for the command to get logged.
Note, that a negative number disables the slow log, while a value of zero forces the logging of every command. slowlog-max-len is the length of the slow log. The minimum value is zero. When a new command is logged and the slow log is already at its maximum length, the oldest one is removed from the queue of logged commands in order to make space. The configuration can be done by editing redis.conf or while the server is running using the CONFIG GET and CONFIG SET commands.
Return Value
Simple string reply.
Syntax
Following is the basic syntax of Redis SLOWLOG command.
redis 127.0.0.1:6379> SLOWLOG subcommand [argument]
Sample output
redis 127.0.0.1:6379> slowlog get 2 1) 1) (integer) 14 2) (integer) 1309448221 3) (integer) 15 4) 1) "ping" 2) 1) (integer) 13 2) (integer) 1309448128 3) (integer) 30 4) 1) "slowlog" 2) "get" 3) "100"
Pingback: Redis - Server - Adglob Infosystem Pvt Ltd