YouTip LogoYouTip

Server Slowlog

# Redis slowlog Command * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0)) Redis Tutorial (#)(#)(#)(#)(#) ## Redis Commands (#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#) ## Advanced Redis Tutorials (#)(#)(#)(#)(#)(#)(#)(#) [](#)(#) (#)[](#) # Redis slowlog Command !(#)(#) Redis slowlog is a logging system used by Redis to record the execution time of queries. The query execution time refers only to the time spent executing a query command itself, excluding I/O operations such as client communication or sending replies. Additionally, the slow log is stored in memory, offering very fast read and write speeds. Therefore, you can use it confidently without worrying that enabling slow log will degrade Redis performance. ### Syntax The basic syntax for the Redis slowlog command is as follows: redis 127.0.0.1:6379> SLOWLOG subcommand ### Available since version >= 2.2.12 ### Return value Returns different values depending on the specific subcommand used. ### Examples View log entries: redis 127.0.0.1:6379> slowlog get 21) 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" Check the current number of log entries: redis 127.0.0.1:6379> SLOWLOG LEN (integer) 14 Use the command `SLOWLOG RESET` to clear the slow log. redis 127.0.0.1:6379> SLOWLOG LEN (integer) 14 redis 127.0.0.1:6379> SLOWLOG RESET OK redis 127.0.0.1:6379> SLOWLOG LEN (integer) 0 !(#)(#)
← Server Config RewriteServer Client Pause β†’