memcache, as an excellent out-of-process cache, is often used in highly concurrent systems Framework Medium. This article mainly talks about how to check memcache running status and manage and maintain its key through telnet tool. Assume the memcache installation directory: / usr/local/memcached
1. Start memcache
- [root@localhost ~]# /usr/local/memcached/bin/memcached -d -m 512 -u root -l 192.168.119.70 -p 12000 -c 512 -P /usr/local/memcached/memcached.pid
Detailed start-up parameters
- d: Start as a daemon. If this parameter is not specified, memcache automatically closes when the ctrl+c command is completed
- m: The largest unit of memory allocated to memcache is m, which defaults to 64m.
- u: Specify the user who runs memcache
- l: Specify the ip address to listen on
- p: specify the tcp port number to listen on, and the udp port can be specified by - u. The default is 11211.
- c: Maximum number of concurrent connections
- P: File of error process id
After memcache is started, we can connect memcache through telnet and manage it simply.
2. telnet connection memcache
- [root@localhost ~]# telnet 192.168.119.70 12000
- Trying 192.168.119.70...
- Connected to 192.168.119.70 (192.168.119.70).
- Escape character is '^]'.