Redis常用命令解析――INFO,MONITOR,SLOWLOG(二)

2015-02-03 12:04:18 · 作者: · 浏览: 193
unix timestamp at which the logged command was processed.
  • The amount of time needed for its execution, in microseconds(注意,microseconds翻译成微秒,而不是毫秒).
  • The array composing the arguments of the command.

    使用SLOWLOG GET N就可以获取最近N条慢日志。

    127.0.0.1:6379> slowlog get 2
    1) 1) (integer) 27
       2) (integer) 1417531320
       3) (integer) 24623
       4) 1) "info"
    2) 1) (integer) 26
       2) (integer) 1417528379
       3) (integer) 21363
       4) 1) "get"
          2) "user:score"

    使用SLOWLOG RESET命令重置慢日志。一旦执行,将丢失以前的所有慢日志。

    127.0.0.1:6379> slowlog reset