Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Memcached stats command


May 17, 2021 Memcached



The Memcached stats command is used to return statistics such as PID (process number), version number, number of connections, and so on.

Grammar:

The basic syntax format of the stats command is as follows:

stats

Instance

In the following example, we used the stats command to output the Memcached service information.

stats
STAT pid 1162
STAT uptime 5022
STAT time 1415208270
STAT version 1.4.14
STAT libevent 2.0.19-stable
STAT pointer_size 64
STAT rusage_user 0.096006
STAT rusage_system 0.152009
STAT curr_connections 5
STAT total_connections 6
STAT connection_structures 6
STAT reserved_fds 20
STAT cmd_get 6
STAT cmd_set 4
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 4
STAT get_misses 2
STAT delete_misses 1
STAT delete_hits 1
STAT incr_misses 2
STAT incr_hits 1
STAT decr_misses 0
STAT decr_hits 1
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 262
STAT bytes_written 313
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT expired_unfetched 1
STAT evicted_unfetched 0
STAT bytes 142
STAT curr_items 2
STAT total_items 6
STAT evictions 0
STAT reclaimed 1
END

A lot of status information is displayed here, and each status item is explained in detail between:

  • pid : memcache server process ID
  • uptime: The number of seconds the server has been running
  • time: The server's current Unix timestamp
  • version: memcache version
  • pointer_size: Operating system pointer size
  • rusage_user: Process cumulative user time
  • rusage_system: Process cumulative system time
  • curr_connections: The current number of connections
  • total_connections: Total connections since Memcached ran
  • connection_structures: The number of connections allocated by Memcached
  • cmd_get:get command requests
  • cmd_set number of requests for the :set command
  • cmd_flush: Flush command requests
  • get_hits:get command hits
  • get_misses: Get command misses
  • delete_misses :d number of misses for the eelete command
  • delete_hits :d number of times the elelete command hits
  • incr_misses:incr command misses
  • incr_hits:incr command hits
  • decr_misses :d number of missed ecr commands
  • decr_hits :d the ecr command hits
  • cas_misses: Cas command misses
  • cas_hits: Cas command hits
  • cas_badval: Number of wipes used
  • auth_cmds: The number of times the authentication command was processed
  • auth_errors: Number of certification failures
  • bytes_read: The total number of bytes read
  • bytes_written: The total number of bytes sent
  • limit_maxbytes: Total memory allocated (bytes)
  • accepting_conns: Whether the server has reached the maximum connection (0/1)
  • listen_disabled_num: The number of failed listening
  • Threads: The current number of threads
  • conn_yields: The number of active abandonments by the connection operation
  • Bytes: The number of bytes currently occupied by the store
  • curr_items: The total number of data currently stored
  • total_items: The total number of data stored since startup
  • Evictions: The number of objects released by the LRU
  • Reclaimed: The number of expired data entries to store new data