转载:
适用于在服务端查看memcache内存数据
php代码:
addServer('127.0.0.1'); // edit here if your memcached server differs from localhost$list = array();$allSlabs = $memcache->getExtendedStats('slabs');$items = $memcache->getExtendedStats('items');foreach($allSlabs as $server => $slabs) { foreach($slabs AS $slabId => $slabMeta) { $cdump = $memcache->getExtendedStats('cachedump',(int)$slabId); foreach($cdump AS $server => $entries) { if($entries) { foreach($entries AS $eName => $eData) { $list[$eName] = array( 'key' => $eName, 'value' => $memcache->get($eName) ); } } } }}ksort($list);if (isset($_GET['del'])) { $memcache->delete($_GET['del']); header("Location: " . $_SERVER['PHP_SELF']);}if (isset($_GET['flush'])) { $memcache->flush(); header("Location: " . $_SERVER['PHP_SELF']);}if (isset($_GET['set'])) { $memcache->set($_GET['set'], $_GET['value']); header("Location: " . $_SERVER['PHP_SELF']);}?>
效果:
之前也用过fastonosql 非常好用,但可惜开始收费了。
还有一个web管理软件:TreeSoft数据库管理系统