memcache 查詢key

####刷入數據code

get

####取出全部key的slabidit

# echo -en 'stats items\r\n'|nc 127.0.0.1 11212|awk -F: '{print $2}'|grep -v ^$|uniqawk

1

查看全部key

# echo -en 'stats items\r\n'|nc 127.0.0.1 11212|awk -F: '{print $2}'|grep -v ^$|uniq|while read i;do echo -en "stats cachedump $i 0\r\n"|nc 127.0.0.1 11212;done |awk -F' ' '{print $2}'|grep -v ^$grep

c
b
a

查看全部key對應的value

# echo -en 'stats items\r\n'|nc 127.0.0.1 11212|awk -F: '{print $2}'|grep -v ^$|uniq|while read i;do echo -en "stats cachedump $i 0\r\n"|nc 127.0.0.1 11212;done |awk -F' ' '{print $2}'|grep -v ^$|while read key;do echo -en "get $key\r\n"|nc 127.0.0.1 11212;done數據

VALUE c 0 1
4
END
VALUE b 0 1
2
END
VALUE a 0 1
1
END
相關文章
相關標籤/搜索