In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the common parameters of starting Memcache and the detailed explanation of telnet command". In the daily operation, I believe that many people have doubts about the common parameters of starting Memcache and the detailed explanation of telnet command. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "common parameters of starting Memcache and detailed explanation of telnet command". Next, please follow the editor to study!
1. Common parameters for starting Memcache
The copy code is as follows:
-p TCP port on which to listen (default: 11211)
-U UDP listening port (default: 11211, closed at 0)
-d runs as a daemon
-u non-root users running accounts running Memcached
-m the largest memory usage unit is MB. The default is 64MB.
-c the default number of soft connections is 1024
-v output warning and error messages
-vv print the request and return information of the client
-h print help information
-I print copyright information for memcached and libevent
-l bind address (default: all are allowed. No matter whether the IP is changed in the internal or public network or locally, there is a security risk. If it is set to 127.0.0.1, it can only be accessed locally)
-P writes PID to a file, which allows a quick process termination later, which needs to be used in conjunction with-d
2. Memcache telnet common commands
COMMANDDESCRIPTIONEXAMPLEgetReads a valueget mykeysetSet a key unconditionallyset mykey 0 60 5addAdd a new keyadd newkey 0 60 5replaceOverwrite existing keyreplace key 0 60 5appendAppend data to existing keyappend key 0 60 15prependPrepend data to existing keyprepend key 0 60 15incrIncrements numerical key value by given numberincr mykey 2decrDecrements numerical key value by given numberdecr mykey 5deleteDeletes an existing keydelete mykeyflush_allInvalidate specific items immediatelyflush_allInvalidate all items in n secondsflush_all 900statsPrints general statisticsstatsPrints memory statisticsstats slabsPrints memory statisticsstats mallocPrint higher level allocation statisticsstats itemsstats detailstats sizesResets statisticsstats resetversionPrints server version.versionverbosityIncreases log levelverbosityquitTerminate telnet sessionquit
3. Detailed explanation of stats command
Number of seconds that the pidmemcache server's process IDuptime server has been running the time server's current unix timestamp versionmemcache version pointer_size current operating system pointer size (32-bit system is generally 32bit) cumulative user time of rusage_user process cumulative system time of rusage_system process number of items currently stored by curr_items server total_items total number of items stored since server startup bytes current server storage Number of bytes occupied by items number of connections currently open curr_connections number of connections opened since server startup number of connections allocated by connection_structures server cmd_getget command (get) total number of requests cmd_setset command (save) total number of requests get_hits total number of misses evictions number of items deleted for free memory (space allocated to memcache When full, you need to delete the old items to get the space allocated to the new items) bytes_read total read bytes (request bytes) bytes_written total send bytes (result bytes) memory size (bytes) threads current threads allocated by limit_maxbytes to memcache
4. Memcache starts tips
A: listen for private network addresses
B: modify the default port number
C: set the maximum number of connections, maximum memory footprint
At this point, the study of "common parameters for starting Memcache and detailed explanation of telnet commands" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.