I encountered a weird question today .I found have three items in a slab by run command "stats items" , but when i run command "stats cachedump 1 0" for view item infomation this slab , only show two items , this slab number is 1.
The output of the command "stats items" :
stats items
STAT items:1:number 3
STAT items:1:number_hot 0
STAT items:1:number_warm 1
STAT items:1:number_cold 2
STAT items:1:age_hot 0
STAT items:1:age_warm 5171
STAT items:1:age 5409
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
STAT items:1:evicted_active 0
STAT items:1:crawler_reclaimed 0
STAT items:1:crawler_items_checked 38
STAT items:1:lrutail_reflocked 2
STAT items:1:moves_to_cold 7
STAT items:1:moves_to_warm 3
STAT items:1:moves_within_lru 1
STAT items:1:direct_reclaims 0
STAT items:1:hits_to_hot 0
STAT items:1:hits_to_warm 1
STAT items:1:hits_to_cold 6
STAT items:1:hits_to_temp 0
END
The field "number" value is 3 ; there are three items in slab1.
The output of the command "stats cachedump" :
stats cachedump 1 0
ITEM foo [3 b; 0 s]
ITEM mykey [12 b; 0 s]
END
Show two items, and their key are foo and mykey .
My memcached server version : memcached-1.5.3
Why is this ? Shout not it is show three items?
I guess that it returns COLD items only
This command works for me
lru_crawler metadump $slabid