COMMANDLOG LEN · Valkey

COMMANDLOG LEN

Returns the number of entries in the specified type of command log.

Usage

COMMANDLOG LEN <slow | large-request | large-reply>

Description

The COMMANDLOG LEN command returns the current number of entries in the specified type of command log.

A new entry is added to the specified command log whenever a command exceeds the corresponding threshold. There are currently three different types of command log, each with an independent threshold, including commandlog-execution-slower-than, commandlog-request-larger-than, and commandlog-reply-larger-than.

The maximum number of entries in the different command log is governed by the commandlog-slow-execution-max-len, commandlog-large-request-max-len and commandlog-large-reply-max-len configurations.

Once the command log reaches its maximal size, the oldest entry is removed whenever a new entry is created.

The command log can be cleared with the COMMANDLOG RESET command.

Complexity

O(1)

ACL Categories

@admin @dangerous @slow

History

See also

ACL, ACL CAT, ACL DELUSER, ACL DRYRUN, ACL GENPASS, ACL GETUSER, ACL HELP, ACL LIST, ACL LOAD, ACL LOG, ACL SAVE, ACL SETUSER, ACL USERS, ACL WHOAMI, BGREWRITEAOF, BGSAVE, COMMAND, COMMAND COUNT, COMMAND DOCS, COMMAND GETKEYS, COMMAND GETKEYSANDFLAGS, COMMAND HELP, COMMAND INFO, COMMAND LIST, COMMANDLOG, COMMANDLOG GET, COMMANDLOG HELP, COMMANDLOG RESET, CONFIG, CONFIG GET, CONFIG HELP, CONFIG RESETSTAT, CONFIG REWRITE, CONFIG SET, DBSIZE, DEBUG, FAILOVER, FLUSHALL, FLUSHDB, INFO, LASTSAVE, LATENCY, LATENCY DOCTOR, LATENCY GRAPH, LATENCY HELP, LATENCY HISTOGRAM, LATENCY HISTORY, LATENCY LATEST, LATENCY RESET, LOLWUT, MEMORY, MEMORY DOCTOR, MEMORY HELP, MEMORY MALLOC-STATS, MEMORY PURGE, MEMORY STATS, MEMORY USAGE, MODULE, MODULE HELP, MODULE LIST, MODULE LOAD, MODULE LOADEX, MODULE UNLOAD, MONITOR, PSYNC, REPLCONF, REPLICAOF, RESTORE-ASKING, ROLE, SAVE, SHUTDOWN, SWAPDB, SYNC, TIME.