Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect and view memcached data using the command line

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "using the command line to connect and view memcached data", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to connect and view memcached data using the command line.

First connect the memcached

Telnet 127.0.0.0 11211

Then list all the items

Stats items

The results are as follows

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

Then get all the key under item through itemid

For example, get all key with an itemid of 5 (5 is id,0 and get all)

Stat cachedump 5 0

Results:

ITEM 02a576f1b8416724f119693470f713b9 [145b; 1571811395 s] ITEM 0180882b03dc215c916481cfd46ffe71 [145b; 1571801564s] ITEM 6c2f83523dc06bb029bb2981940d5a40 [145b; 1571730004 s]

Finally, get the data of the specified key through the get command

Get 02a576f1b8416724f119693470f713b9

Through this command, you can get the data of the specified key.

At this point, I believe you have a better understanding of "using the command line to connect and view memcached data". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report