MEMCACHED-TOOL(1)

πŸ’– MEMCACHED-TOOL(1) πŸ’–

okay bestie, so this is a page from the General Commands Manual and it's literally about memcached-tool, which is a whole vibe. buckle up πŸŽ€


✨ NAME ✨

memcached-tool β€” the stats-and-management tool for memcached, no cap πŸ’…


🌸 SYNOPSIS 🌸

memcached-tool <host[:port] | /path/to/socket> [mode]

that's it. that's the whole thing. two lil arguments and you're slaying πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so memcached-tool is a Perl script β€” yes, Perl, she's vintage and iconic β€” and her whole job is printing statistics from a memcached instance that's already running. 🧚

the first parameter tells her where the daemon lives. you can give her either:

  • a hostname, optionally followed by the port number (and if you don't say a port, the default is 11211, periodt), or
  • a path to a UNIX domain socket.

the second parameter is the mode β€” aka which flavour of tool you want her to run. main character energy, choose wisely πŸ‘‘


πŸ”₯ MODES πŸ”₯

🌈 display

prints slab class statistics. this is the default mode if you don't specify a mode at all β€” she just does it automatically, generous queen.

the columns she prints are:

  • # β€” the number of the slab class.
  • Item_Size β€” how much space each chunk uses. one item uses one chunk of the appropriate size. one item, one chunk, that's the rule πŸ’«
  • Max_age β€” the age of the oldest item in the LRU.
  • Pages β€” total number of pages allocated to the slab class.
  • Count β€” how many items are presently stored in this class. ⚠️ heads up: expired items are not automatically excluded, so don't come for her about the numbers, she's telling the truth as she sees it.
  • Full? β€” Yes if there are no free chunks at the end of the last allocated page.
  • Evicted β€” the number of times an item had to be evicted from the LRU before it expired. 😭
  • Evict_Time β€” seconds since the last access for the most recent item evicted from this class. it's giving "how long ago did we lose her" πŸ•°οΈ
  • OOM β€” the number of times the underlying slab class was unable to store a new item. out of memory, out of luck πŸ’€

⭐ stats

prints the general-purpose statistics of the daemon. each line has the name of the statistic and its value. simple. clean. iconic. ✨


🫢 dump [limit]

makes a partial dump of the cache, written in the add statements of the memcached protocol. πŸŽ€

and if limit is given and it's a strictly positive integer, then the dump is limited to that number of items. no limit? no cap on the dump. iykyk πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’– AUTHOR πŸ’–

the memcached-tool script was written by Brad Fitzpatrick <brad@danga.com> β€” king behaviour, we love to see it 🌟


and that's the whole page, bestie!! πŸŽ‰ this little love letter was dated Jul 2, 2013, and it's filed under General Commands Manual as MEMCACHED-TOOL(1). go forth and check your slabs, mwah πŸ’‹πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from