十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
本篇内容主要讲解“使用命令行连接并查看memcached数据的方法”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“使用命令行连接并查看memcached数据的方法”吧!
创新互联主营白塔网站建设的网络公司,主营网站建设方案,重庆APP软件开发,白塔h5成都小程序开发搭建,白塔网站营销推广欢迎白塔等地区企业咨询
首先连接memcached
telnet 127.0.0.0 11211
然后列出所有items
stats items
结果如下
STAT items:5:number 3
STAT items:5:number_hot 0
STAT items:5:number_warm 0
STAT items:5:number_cold 3
STAT items:5:age_hot 0
STAT items:5:age_warm 0
STAT items:5:age 81407
STAT items:5:mem_requested 720
STAT items:5:evicted 0
STAT items:5:evicted_nonzero 0
STAT items:5:evicted_time 0
STAT items:5:outofmemory 0
STAT items:5:tailrepairs 0
STAT items:5:reclaimed 5
STAT items:5:expired_unfetched 4
STAT items:5:evicted_unfetched 0
STAT items:5:evicted_active 0
STAT items:5:crawler_reclaimed 1
STAT items:5:crawler_items_checked 170
STAT items:5:lrutail_reflocked 16
STAT items:5:moves_to_cold 29
STAT items:5:moves_to_warm 20
STAT items:5:moves_within_lru 25
STAT items:5:direct_reclaims 0
STAT items:5:hits_to_hot 0
STAT items:5:hits_to_warm 25
STAT items:5:hits_to_cold 24
STAT items:5:hits_to_temp 0
STAT items:15:number 1
STAT items:15:number_hot 0
STAT items:15:number_warm 0
STAT items:15:number_cold 1
STAT items:15:age_hot 0
STAT items:15:age_warm 0
STAT items:15:age 30
STAT items:15:mem_requested 1950
STAT items:15:evicted 0
STAT items:15:evicted_nonzero 0
STAT items:15:evicted_time 0
STAT items:15:outofmemory 0
STAT items:15:tailrepairs 0
STAT items:15:reclaimed 10
STAT items:15:expired_unfetched 0
STAT items:15:evicted_unfetched 0
STAT items:15:evicted_active 0
STAT items:15:crawler_reclaimed 0
STAT items:15:crawler_items_checked 6
STAT items:15:lrutail_reflocked 128
STAT items:15:moves_to_cold 185
STAT items:15:moves_to_warm 174
STAT items:15:moves_within_lru 0
STAT items:15:direct_reclaims 0
STAT items:15:hits_to_hot 1
STAT items:15:hits_to_warm 0
STAT items:15:hits_to_cold 184
STAT items:15:hits_to_temp 0
然后通过itemid获取item下的所有key
例如获取itemid为5的所有key(5是id,0是获取所有)
stat cachedump 5 0
结果:
ITEM 02a576f1b8416724f119693470f713b9 [145 b; 1571811395 s] ITEM 0180882b03dc215c916481cfd46ffe71 [145 b; 1571801564 s] ITEM 6c2f83523dc06bb029bb2981940d5a40 [145 b; 1571730004 s]
最后通过get命令获取指定key的数据
get 02a576f1b8416724f119693470f713b9
通过该命令就可以获取到指定key的数据了
到此,相信大家对“使用命令行连接并查看memcached数据的方法”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!