niceman114
8/24/2017 - 12:46 AM

memcached-dump.sh

MEMCACHED_HOST=localhost
MEMCACHED_PORT=11211
printf "stats items\n" | nc $MEMCACHED_HOST $MEMCACHED_PORT | grep ":number" | awk -F":" '{print $2}' | xargs -I % printf "stats cachedump % 10000\r\n" | nc $MEMCACHED_HOST $MEMCACHED_PORT