Go to the installation directory, start memcached:/usr/local/memcached/bin/memcached-d-c 10240-m 1024-u root get running status: Echo Stats | NC localhost 11211 (can view PID) or use Ps-ef|grep memcached stop memcached:kill-9 pid (-9 for forced kill, PID for process identifier)-D The option is to start a daemon,-M is the amount of memory allocated to Memcache, the unit is MB, here is 1024MB, the default is 64mb-u is the user running memcache, here is the server IP address of the listener is listening, the default should be native-p is to set the Memcache listening port, the default is 11211, preferably more than 1024 port-C option is the maximum number of concurrent connections, the default is 1024, here set 10240, according to the load of your server to set-p is set to save memcache PID file Location-H print Help information-V Output warning and error message-VV Print client request and return information ps-ef|grep memcached (command description) grep: Function Description: Find a string in the file that matches the criteria. |: Pipeline command operator PS (process status): Function Description: Report the status of the program. Connect to memcached:telnet IP ports, such as Telnet 192.168.100.11 11211stats view status, Flush_all: Clear cache basic commands for viewing memcached status, This command allows you to see the following information: STAT PID 22459 & nbsp Process Idstat uptime 1027046 Server run seconds stat Tim E 1273043062 Server current UNIX timestamp stat version 1.4.4 Server version stat pointer_size OS Word Size (this server is 64-bit) stat Rusage_user 0.040000 Process Cumulative User Time stat Rusage_ System 0.260000 Process cumulative systems Time stat curr_connections &NBS P Current open connections stat total_connections, &NBSP ; Total number of connections that have been opened stat connection_structures Server-allocated number of connection structures stat Cmd_ge T Execute get command total stat cmd_se T Execute SET command total stat CMD_FL Ush 3 point to Flush_all total number of commands stat get_hits 9 get hit count stat get_misses Get misses stat delete_misses 5 & nbsp Delete misses stat delete_hits 1 & nbsp Delete hit count stat incr_misses 0 &N Bsp INCR number of misses stat incr_hits 0 &NBSP ; INCR hit count stat decr_misses 0 &NBS P DECR hits stat decr_hits 0 DECR The secondaryCount Stat cas_misses 0 cas number of misses stat Cas_hits 0 cas hit counts stat CA S_badval 0 Use wipe count stat Auth_cmds 0STAT auth_errors 0STAT bytes_read 15785 Read Bytes total Count stat bytes_written 15222 Write bytes total stat limit_maxbytes 1048576 amount of memory allocated (bytes) STAT Accepting_conns 1 &NBSP ; Current number of links received stat Listen_disabled_num 0 &NB Sp Stat Threads 4 Number of threads stat C Onn_yields 0STAT byTES 0 Store item byte number St At Curr_items 0 item count stat Total _items item Total stat Evictions 0 to get the total amount of space deleted item Another example: Start/End MEMCA Ched-d-M 10-u root-l 192.168.0.122-p 11200-c 256-p/tmp/memcached.pid-d option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, here Is 10mb-u is running memcache user, here is Root-l is the server IP address of the listener, if there are more than one address, here specify the server IP address 192.168.0.122-p is set memcache listening port, here set 12000, Preferably more than 1024 of the port-C option is the maximum number of concurrent connections running, the default is 1024, here set 256, according to the load on your server to set-P is set to save memcache pid file Kill ' Cat/tmp/memcached.pid ' Get running status echo stats | NC 192.168.1.123 11200watch "echo Stats | NC 192.168.1.123 11200 "(real-time status)
Linux Command Encyclopedia _ modified version _.rar Http://up.2cto.com/2012/0328/20120328114011242.rar
Linux memcached Boot