Last active
December 16, 2015 13:48
-
-
Save sunliwen/5443756 to your computer and use it in GitHub Desktop.
redis command "KEYS *" for memcached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# It's not possible to have a "KEYS *" command in memcached directly | |
# but could achieve by two steps | |
➜ ~ telnet 127.0.0.1 11211 | |
Trying 127.0.0.1... | |
Connected to localhost. | |
Escape character is '^]'. | |
set one 0 60 1 | |
1 | |
STORED | |
set two 0 60 1 | |
2 | |
STORED | |
set three 0 60 1 | |
3 | |
STORED | |
stats items | |
STAT items:1:number 3 | |
STAT items:1:age 20 | |
STAT items:1:evicted 0 | |
STAT items:1:evicted_nonzero 0 | |
STAT items:1:evicted_time 0 | |
STAT items:1:outofmemory 0 | |
STAT items:1:tailrepairs 0 | |
STAT items:1:reclaimed 0 | |
STAT items:1:expired_unfetched 0 | |
STAT items:1:evicted_unfetched 0 | |
END | |
stats slabs | |
STAT 1:chunk_size 96 | |
STAT 1:chunks_per_page 10922 | |
STAT 1:total_pages 1 | |
STAT 1:total_chunks 10922 | |
STAT 1:used_chunks 3 | |
STAT 1:free_chunks 10919 | |
STAT 1:free_chunks_end 0 | |
STAT 1:mem_requested 209 | |
STAT 1:get_hits 0 | |
STAT 1:cmd_set 3 | |
STAT 1:delete_hits 0 | |
STAT 1:incr_hits 0 | |
STAT 1:decr_hits 0 | |
STAT 1:cas_hits 0 | |
STAT 1:cas_badval 0 | |
STAT 1:touch_hits 0 | |
STAT active_slabs 1 | |
STAT total_malloced 1048512 | |
END | |
stats cachedump 1 10 | |
ITEM three [1 b; 1366725182 s] | |
ITEM two [1 b; 1366725175 s] | |
ITEM one [1 b; 1366725166 s] | |
END | |
stats cachedump 1 2 | |
ITEM three [1 b; 1366725182 s] | |
ITEM two [1 b; 1366725175 s] | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment