user4903
user4903

Reputation:

How can I tell where memcached is storing cached data?

I'm trying to do a performance analysis for an existing client, and I'm having trouble determining whether or not memcached is actually storing data. It looks to be installed and running, but I see nothing in /var/log/memcached.log (on Ubuntu hardy). Can I tell if there are log files elsewhere that would tell me if caching is happening, or where the data is stored? Thanks.

Upvotes: 0

Views: 4329

Answers (5)

user189741
user189741

Reputation:

I wrote a perl script that has top-like output, and will output some basic stats in real-time - gets, hits, the amount of storage used, hit ratio, etc.

Check it out here: http://code.google.com/p/memcache-top/

Upvotes: 2

Andriy Volkov
Andriy Volkov

Reputation: 18933

On Windows, you can use MemCacheD Manager. It shows the stats on its Status tab.

Upvotes: 0

Kathy Van Stone
Kathy Van Stone

Reputation: 26291

If you run memcached with the arguments -vv you will get a log every time just about anything happens to the cache. This will slow it down quite a bit. Also many clients include a status call which gets the status of the memcache. This includes how many items are in the cache, amounst other things. Also check out the monitoring wiki. I don't offhand see a way to get the list of keys in memcached.

Upvotes: 1

Christopher
Christopher

Reputation: 9094

The monitoring HowTo on memcached's site might be helpful for you:

http://code.google.com/p/memcached/wiki/HowToMonitor

There are a variety of scripts for various languages and "manual" connections too. From that page:

"Or, just do a simple connect to the port where memcached is listening. You can run a simple command like 'version' or 'stats' to see if memcached is listening."

Upvotes: 3

Charlie
Charlie

Reputation: 644

As I understand memcached only stores in memory. You can start it with -v or -vv to increase it's verbosity level, but that only writes to stderr

Upvotes: 0

Related Questions