Memcached dump first couple of keys for introspection

Jupyter Data
1 min readAug 26, 2015

--

# connect to the redis instance
telnet 127.0.0.1 11211
#List items
stats items
# get info
stats cachedump 5 100
# Flush
flush_all

Flush Memcached from CLI

echo ‘flush_all’ | netcat localhost 11211

Get Memcached Total Usage

echo "stats" | nc 127.0.0.1 11211 | grep bytesecho "stats" | nc -w 1 localhost 11211 | awk '$2 == "bytes" { print $2" "$3 }'

Configure Memcached params & restart

sudo nano /etc/memcached.conf
# Start with a cap of 64 megs of memory. It’s reasonable, and the daemon default
-m 14096
# File size
-I 128M
# restart
sudo service memcached restart

Memcached Errors faced:

Make sure that your key doesnt contain spaces in it !

WriteError: error 5 from memcached_set: (xxxxxx) CONNECTION FAILURE(Transport endpoint is not connected), host: 127.0.0.1:11211SocketCreateError: error 11 from memcached_set: SUCCESS

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jupyter Data
Jupyter Data

Written by Jupyter Data

Fastest way to Explore your Data

No responses yet

Write a response