memcached Digest, Vol 9, Issue 11

Jacob Coby jcoby at
Tue Apr 12 14:40:18 PDT 2005

KILLROY wrote:
> Hi,
> I would like to repost my earlier request for help. How can I use
> telnet to verify a memcached installation? Especially a win32 binary?

Things prefixed with "$" you write.  Things in <>s are specific to your 
setup.  Things in []s are specific to what you write, but are not 
required to be input. ()s denote comments from me.

I'm assuming you are listening to the default 11211 port.  The output 
shows a linux telnet client, but the win32 client is similar, though it 
may not echo what you type back to you.

$telnet <host> 11211
Trying [hostip]...
Connected to localhost.
Escape character is '^]'.

$stats (get the stats for the server)

STAT pid [pid]
STAT uptime [uptime]
STAT time [time]
STAT version 1.1.11
STAT rusage_user [rusage_user]
STAT rusage_system [rusage_system]
STAT curr_items [curr_items]
STAT total_items [total_items]
STAT bytes [bytes]
STAT curr_connections [curr_connections]
STAT total_connections [total_connections]
STAT connection_structures [connection_structures]
STAT cmd_get [cmd_get]
STAT cmd_set [cmd_set]
STAT get_hits [get_hits]
STAT get_misses [get_misses]
STAT bytes_read [bytes_read]
STAT bytes_written [bytes_written]
STAT limit_maxbytes [limit_maxbytes]

(now let's try to set a key)
$set TEST_KEY 0 60 1 (0 is a flag, 60 seconds timeout, 1 byte length)
$1 (just save a '1')

(and now try to get the key)
VALUE TEST_KEY 0 1 (flag is 0; value is 1 byte long)

$^] (close the connection)
$^D (exit out of telnet)

There are other commands in the memcached protocol that you can play 
with.  See:


More information about the memcached mailing list