Skip to content

Instantly share code, notes, and snippets.

@fukajun
Last active October 22, 2021 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fukajun/85075f98d83eab0e749da2f05cff8fce to your computer and use it in GitHub Desktop.
Save fukajun/85075f98d83eab0e749da2f05cff8fce to your computer and use it in GitHub Desktop.
List up keys in memcached
export memcache.apne1.cache.amazonaws.com
export LIMIT=100000
echo 'stats slabs' | nc $MEMCACHED_HOST 11211 | grep ':' | awk -F '[ :]' '{ print $2 }' | sort -u\
| xargs -n 1 -I '{}' bash -c 'echo "stats cachedump {} $LIMIT" | nc $MEMCACHED_HOST 11211'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment