Memcached and telnet


#1

I telnet-ed to a couchbase server in a memcached mode, “stats” returns stats but “stats slabs” or “stats items” give errors. Is it unsupported?


#2

@shigeya in general, the memcached that ships with couchbase server is not comparable to vanilla memcached. We’ve forked long time ago!

Can you show the exact steps you are taking, also against which port?


#3

Thanks daschl, I did like followings:

--> telnet localhost 11211
--> stats
<-- SATA delete_misses 187
<-- ...
<-- END
--> stats slabs
<-- ERROR
--> stats items
<-- ERROR

–> are my input, <-- are reponses. vanilla memcached returns some statistical info in reply to stats slabs and stats items.


#4

Yeah, it could be that those commands are not available against couchbase (because the internal implementation is fundamentally different) - I’ll double check with server engineering on that.


#5

daschl is correct here; our “memcached” is pretty significantly evolved from the upstream. To clarify a couple of things:

Couchbase’s memcached itself no longer supports the ASCII memcached protocol (i.e. raw telnet access), only the binary protocol. It does still expose a bunch of stats, but to access them you need to send a binary STATS command; which is what cbstats does.

When you connect to port 11211 you’re actually connecting to the moxi memcached proxy; which is typically used when you have an existing application which talks to a memcached server and you want to take advantage of newer Couchbase features (clustering, replication, etc) without modifying the application - see http://docs.couchbase.com/admin/admin/Concepts/bp-deployment-strategies.html

_moxi_i itself has some statistics, and that’s what you’re currently retrieving.


#6

Thanks drigby, it’s clear now and I understand about ASCII/binary protocols and there are some patterns for compatibility.