memcachedのバージョンを調べる

$ memcached --help とか $ memcached -v とかやっても、memcached のバージョンが表示されなかったので。

ヘルプメッセージに1行目を確認

$ memcached -h
memcached 1.4.13
-p <num>      TCP port number to listen on (default: 11211)
-U <num>      UDP port number to listen on (default: 11211, 0 is off)
...
$ memcached -h | head -n 1
memcached 1.4.13

memcached プロトコルをしゃべる

memcached プロトコルはシンプル

telnet 経由でバージョンを調べるには次のようにする

$ telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
version
VERSION 1.4.13
^]

netcat(nc) を使うと次のようにできる

$ echo version | nc localhost 11211
VERSION 1.4.13

or

$ nc localhost 11211 <<< version
VERSION 1.4.13
Advertisements
Tagged with:
Posted in database, middleware

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
%d bloggers like this: