Memcached stats reset command

Stats reset is another undocumented feature (see this article for stats cachedump command) of Memcached

stats reset command

Telnet command : stats reset \r\n

This function will reset following stats :

  • total_connections
  • get, set, flush, cas, incr and decr stats
  • auth_cmds and auth_errors
  • bytes_read and bytes_written
  • total_items will be reset but not curr_items
  • evictions and reclaimed

stats reset command example

First we get the current stats :

Now we reset Memcached server stats

The final result :

Be aware that using this function can hide you a lot of things, i find it only useful when we put a new version of cache management to reset all stats and start monitoring the new version without the stats history.

Other Memcached Resources

You can find a lot of Memcached resources on this Memcached resources page.

Leave a Reply

Your email address will not be published. Required fields are marked *