慢日志长度

Syntax
SLOWLOG LEN
Available since:
2.2.12
Time complexity:
O(1)
ACL categories:
@admin, @slow, @dangerous,

此命令返回慢日志中的当前条目数。

每当命令的执行时间超过由slowlog-log-slower-than配置指令定义的执行时间阈值时,就会向慢日志中添加一个新条目。 慢日志中的最大条目数由slowlog-max-len配置指令控制。 一旦慢日志达到其最大大小,每当创建新条目时,最旧的条目将被删除。 可以使用SLOWLOG RESET命令清除慢日志。

RESP2/RESP3 回复

Integer reply: the number of entries in the slow log.
RATE THIS PAGE
Back to top ↑