如何监测memcache服务端的运行状况?

发布时间:2012-11-21 14:50:57

最新的memcache pecl中,新增了一个memcache.php,这个php文件可以用来方便的查看memcache的状况,界面上与apc自带的apc.php风格一致。
官方warnings:


As usual, this piece of software comes with the warnings:
- Don’t expect something complete, might have bugs and security problems etc.
- Do not install on a prod environment unless you’re sure!
- Feel free to add stuff to it, I’ll put it to google code or sf.net soon.
- Feel free to request features. (no I’m not planning a backup tool , there is memcache-tool for that)
- Enjoy!

相关资源

配置详解1、设置用户名和密码


define(‘ADMIN_USERNAME’,'memcache’);    // Admin Username
define(‘ADMIN_PASSWORD’,'password’);      // Admin Password

注:用户名和密码自己设置去吧!
2、配置服务器及其端口


$MEMCACHE_SERVERS[] = ‘mymemcache-server1:11211′; // add more as an array
$MEMCACHE_SERVERS[] = ‘mymemcache-server2:11211′; // add more as an array

更改为:


$MEMCACHE_SERVERS[] = ‘127.0.0.1:11211′; // add more as an array
$MEMCACHE_SERVERS[] = ‘192.168.0.1:11211′; // add more as an array

注:127.0.0.1和192.168.0.1为本机地址,支持检测多个主机的memcache