Basic commands for memcached (installation, uninstallation, startup, configuration related)

Source: Internet
Author: User

Memcachedthe basicCommand(installation, uninstallation, startup, configuration related):
-Pports to listen on
-Lconnected toIPAddress, The default is native
-D StartStartmemcachedService
-D Restartre-upmemcachedService
-D Stop|shutdownClose the runningmemcachedService
-D InstallinstallationmemcachedService
-D UninstallUninstallmemcachedService
-URun as an identity(only in theRooteffective when running) 
-MMaximum memory usage, UnitMB. Default64MB

-M memory is exhausted when an error is returned instead of deleting an item
-C Maximum number of simultaneous connections, default is 1024x768
-F Block size growth factor, default is 1.25
-N Minimum allocated space,key+value+flags default is
-H Display Help

memcached Basic command ( used when memcached is started for memcached Manage the data and the commands that are related to the running state ):

Command

Description

Example

Get

Reads a value

Get MyKey

Set

Set a key unconditionally

Set MyKey 0 60 5

Add

ADD a new key

Add Newkey 0 60 5

Replace

Overwrite existing Key

Replace key 0 60 5

Append

Append data to existing key

Append key 0 60 15

Prepend

Prepend data to existing key

Prepend Key 0 60 15

incr

Increments numerical key value by given number

INCR MyKey 2

Decr

Decrements numerical key value by given number

DECR MyKey 5

Delete

Deletes an existing key

Delete MyKey

Flush_all

Invalidate specific items immediately

Flush_all

Invalidate all items in n seconds

Flush_all 900

Stats

Prints General Statistics

Stats

Prints Memory Statistics

Stats Slabs

Prints Memory Statistics

Stats malloc

Print Higher level allocation statistics

Stats items

Stats Detail

Stats sizes

Resets statistics

Stats Reset

Version

Prints Server version.

Version

Verbosity

Increases log level

Verbosity

Quit

Terminate Telnet session

Quit

Keywords for viewing information in the English table

Pid

Process ID of the Memcache server

Uptime

Number of seconds the server has been running

Time

Server's current UNIX timestamp

Version

Memcache version

Pointer_size

The current operating system pointer size (32-bit system is generally 32bit)

Rusage_user

Cumulative user time for the process

Rusage_system

Cumulative system time for processes

Curr_items

The number of items currently stored by the server

Total_items

The total number of items stored since the server was started

bytes

The number of bytes occupied by the current server store items

Curr_connections

Number of connections currently open

Total_connections

Number of connections that have been opened since the server was started

Connection_structures

Number of connection constructs allocated by the server

Cmd_get

Get command (GET) total number of requests

Cmd_set

Set command (Save) Total Request count

Get_hits

Total Hit Count

Get_misses

Total number of Misses

Evictions

Items deleted in order to get free memory (the space allocated to memcache needs to be deleted after the old items are allocated to the new items)

Bytes_read

Total bytes read (number of requests bytes)

Bytes_written

Total Bytes sent (bytes of result)

Limit_maxbytes

Size of memory allocated to Memcache (bytes)

Threads

Current number of threads

Basic commands for memcached (installation, uninstallation, startup, configuration related)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.