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.
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
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."
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.
On Windows, you can use MemCacheD Manager. It shows the stats on its Status tab.
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/