Saturday, 10 March 2018

memcached

1.https://serverfault.com/questions/207356/view-content-of-memcached

Try stats items - i.e.
echo "stats items" | nc 127.0.0.1 11211


The correct answer would be echo "stats cachedump SLABS_ID LIMIT" | nc HOSTNAME PORT
eg. echo "stats cachedump 15 4" | nc 127.0.0.1 11211
This would give the output on the lines of:
ITEM cache_path-comments%2Fpage%2F2 [2211 b; 1337195558 s]
ITEM cache_path-comments%2Fpage%2F5 [2205 b; 1337195558 s]
ITEM cache_path-comments%2Fpage%2F6 [2179 b; 1337195558 s]
ITEM cache_path-comments [2164 b; 1337195558 s]
END
Note: This is an undocumented command that is not supported by the memcached team and can be removed in any version. For the complete reference, check out Understanding Memcached stats cachedump command.
The correct answer would be echo "stats cachedump SLABS_ID LIMIT" | nc HOSTNAME PORT
eg. echo "stats cachedump 15 4" | nc 127.0.0.1 11211
This would give the output on the lines of:
ITEM cache_path-comments%2Fpage%2F2 [2211 b; 1337195558 s]
ITEM cache_path-comments%2Fpage%2F5 [2205 b; 1337195558 s]
ITEM cache_path-comments%2Fpage%2F6 [2179 b; 1337195558 s]
ITEM cache_path-comments [2164 b; 1337195558 s]
END
Note: This is an undocumented command that is not supported by the memcached team and can be removed in any version. For the complete reference, check out Understanding Memcached stats cachedump command.