MEMSTAT(1)

๐Ÿ’… MEMSTAT(1) โ€” your girl's guide to memstat

okay bestie, welcome to memstat(1), straight out of libmemcached-awesome โœจ this is the little tool that strolls up to your memcached(1) servers and asks them how they're doing. no cap, it's giving "wellness check for your cache" ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

memstat โ€” libmemcached Documentation ๐Ÿ’–

(yeah, the official NAME section is literally just "libmemcached Documentation", we're not gonna pretend otherwise, periodt)


โœจ SYNOPSIS โœจ

memstat [options] [stat args]

Gather statistics from a server ๐Ÿ‘‘


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So here's the vibe: memstat dumps the state of memcached(1) servers. All of it. It prints all data to stdout ๐Ÿ’ซ

That's it, that's the whole personality. She shows up, she dumps state, she leaves. iconic.


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -h, --help โ€” Display help. your lil "what do I do" button ๐Ÿฅบ
  • -V, --version โ€” Display version. proof of who she is โœจ
  • -q, --quiet โ€” Operate quietly ๐Ÿคซ (lowercase girlie)
  • -v, --verbose โ€” Operate more verbosely ๐Ÿ—ฃ๏ธ (uppercase girlie energy)
  • -d, --debug โ€” See -v, --verbose. basically the same thing, she's just wearing a different outfit ๐Ÿ’…
  • -s, --servers <list of servers> โ€” Specify the list of servers as hostname[:port][,hostname[:port]...]. yes the bracket situation is real, that's the whole format, copy it carefully bestie ๐Ÿงš
  • -n, --non-blocking โ€” Enable non-blocking operations. no waiting around fr fr
  • -N, --tcp-nodelay โ€” Disable Nagle's algorithm. less batching, more immediate, we love a fast girl ๐Ÿ”ฅ
  • -b, --binary โ€” Enable binary protocol. binary mode activated bestie ๐Ÿ’€
  • -B, --buffer โ€” Buffer requests. hold it, hold it, annnnnd go ๐Ÿ“ฆ
  • -u, --username <username> โ€” Use username for SASL authentication ๐Ÿ”
  • -p, --password <password> โ€” Use password for SASL authentication ๐Ÿค
  • -A, --args <stat> โ€” Stat args.
โš ๏ธ DEPRECATED: use positional arguments. seriously, use the positional args instead, this one's on the way out, don't get attached ๐Ÿ˜ญ
  • -a, --analyze [<arg>] โ€” Analyze and print differences of a server cluster. A memory and uptime comparison is performed by default ๐Ÿ‘‘

Options:

  • --analyze[=default] โ€” Memory and uptime comparison.
  • --analyze=latency โ€” Network latency comparison. (speed-checking your cluster, we love to see it โญ)
  • -S, -server-version โ€” Obtain and print server version(s) only. just the version, nothing else, she's being mysterious ๐Ÿ™ˆ
  • --iterations โ€” Iteration count of GETs sent by the latency test (default: 1000). a thousand whole GETs, go off ๐Ÿ’ฏ

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • MEMCACHED_SERVERS โ€” Specify a list of servers. set it once, forget about it, live your life ๐Ÿซถ

๐Ÿ’œ NOTES ๐Ÿ’œ

๐ŸŒŸ PROGRAM PREFIX ๐ŸŒŸ

okay this part is a lil meta but it's important iykyk:

The prefix of this program is variable, i.e. it can be configured at build time ๐Ÿ‘ทโ€โ™€๏ธ

Usually the client programs of libmemcached-awesome are prefixed with mem, like memcat or memcp ๐Ÿฑ

It can be configured, though, to replace the prefix with something else like mc โ€” in case of that, the client programs of libmemcached-awesome would be called mccat, mccp, etc. respectively ๐Ÿ˜ฎโ€๐Ÿ’จ so if you can't find memstat, maybe she's going by another name now, main character rebrand energy fr fr.


โญ SEE ALSO โญ

memcached(1) libmemcached(3) ๐Ÿ’–

  • C/C++ Client Library for memcached
  • Working with statistical information from a server

๐Ÿ’ก friendly reminder: everything gets printed to stdout. pipe it, redirect it, frame it, do whatever, she doesn't judge ๐ŸŽ€

k so that's the whole page bestie ๐ŸŒธ this was libmemcached-awesome, version 1.1, dated Jul 18, 2024 โ€” go forth, run memstat, gather those stats, and slay ๐Ÿ’…๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from