COMMANDLOG-LEN(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– COMMANDLOG-LEN πŸ’–

okay bestie, welcome to the commandlog-len page from the Valkey Command Manual (section 3valkey, iykyk) β€” it's short, it's sweet, and it counts things. let's go 🫢


✨ NAME ✨

commandlog-len β€” literally just returns the number of entries in the specified type of command log. that's the whole job. she's focused πŸ’…


🌸 SYNOPSIS 🌸

COMMANDLOG LEN <SLOW | LARGE-REQUEST | LARGE-REPLY>

πŸ¦‹ DESCRIPTION πŸ¦‹

so COMMANDLOG LEN gives you the current number of entries in whichever type of command log you point at. simple as that ✨

here's the tea though: a brand new entry gets added to that command log every single time a command goes over the corresponding threshold. the way that works is there are three different types of command log right now, and each one has its own independent threshold:

  • commandlog-execution-slower-than
  • commandlog-request-larger-than
  • commandlog-reply-larger-than

and the maximum number of entries each one can hold? that's governed by these configs, bestie:

  • commandlog-slow-execution-max-len
  • commandlog-large-request-max-len
  • commandlog-large-reply-max-len
⚠️ heads up: once a command log hits its maximal size, the oldest entry gets removed every time a new entry shows up. it's giving ring buffer. first in, first out, no cap πŸŽ€

and if you ever wanna just wipe the whole thing? the command log can be cleared with the valkey-commandlog-reset(7) COMMANDLOG RESET command. clean slate energy 🌈


πŸ‘‘ COMPLEXITY πŸ‘‘

O(1)

constant time, no notes, she ate and left zero crumbs πŸ’…


πŸ”₯ ACL CATEGORIES πŸ”₯

@admin @dangerous @slow

(yeah she's a little dangerous, that's kind of her whole vibe πŸ™ˆ)


⭐ HISTORY ⭐

  • Available since: 8.1.0

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, fr fr:


okay that's the whole page bestie, you're so welcome πŸ’–

this cutie is version 9.0.0, dated 2025-10-21 β€” go forth and count your log entries, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from