Memcached memory usage

Solution 1:

As Mike said, you can look at the line including the "STAT bytes" to see memory usage:

$ echo "stats" | nc -w 1 <host> <port> | awk '$2 == "bytes" { print $2" "$3 }'

Solution 2:

memcache's default port is 11211 so if memcache is local

telnet localhost 11211

Then run the stats command and that will spit out memory usage

stats

Solution 3:

I personally use PhpMemcacheAdmin

http://code.google.com/p/phpmemcacheadmin/

It creates an easy to use GUI. Of course you'll need to have PHP support.

Solution 4:

Another alternative to answer @mike,

echo "stats" | nc localhost 11211
#or
echo "stats settings" | nc localhost 11211