View Allocated Memcached Memory

Here is a little snippet to see the allocated memory for memcached server in an Debian based distribution…


# install libmemcached-tools, if not done already
apt-get -y install libmemcached-tools

/usr/share/memcached/scripts/memcached-tool 127.0.0.1:11211 stats | grep limit_maxbytes | awk '{print $2/(1024*1024)}'

This will output the max memory that memcached server can use in MBs.

Advertisements

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