";
echo "Memcache Server version | ".$stat["version"]." |
";
echo "Process id of this server process | ".$stat["pid"]." |
";
echo "Server uptime | ".$stat["uptime"]." seconds |
";
echo "Accumulated user time for this process | ".round($stat["rusage_user"],1)." seconds |
";
echo "Accumulated system time for this process | ".round($stat["rusage_system"],1)." seconds |
";
echo "Total number of items stored by this server start | ".$stat["total_items"]." |
";
echo "Number of open connections | ".$stat["curr_connections"]." |
";
echo "Total number of connections opened since server start | ".$stat["total_connections"]." |
";
echo "Number of connection structures allocated by the server | ".$stat["connection_structures"]." |
";
echo "Cumulative number of retrieval requests | ".$stat["cmd_get"]." |
";
echo " Cumulative number of storage requests | ".$stat["cmd_set"]." |
";
$percCacheHit=((real)$stat["get_hits"]/ (real)$stat["cmd_get"] *100);
$percCacheHit=round($percCacheHit,3);
$percCacheMiss=100-$percCacheHit;
echo "Number of keys that have been requested and found | ".$stat["get_hits"]." ($percCacheHit%) |
";
echo "Number of items that have been requested and not found | ".$stat["get_misses"]." ($percCacheMiss%) |
";
$MBRead= (real)$stat["bytes_read"]/(1024*1024);
echo "Total number of bytes read by this server from network | ".$MBRead." MB |
";
$MBWrite=(real) $stat["bytes_written"]/(1024*1024) ;
echo "Total number of bytes sent by this server to network | ".$MBWrite." MB |
";
$MBSize=(real) $stat["limit_maxbytes"]/(1024*1024) ;
echo "Size allowed to use for storage | ".$MBSize." MB |
";
echo "Items removed from cache to free memory for new items | ".$stat["evictions"]." |
";
echo "
";
}
printStats($this->memcache->memcache->getStats());
$res = array();
function cmp($a, $b)
{
return $a[2] < $b[2];
}
if (!empty($a))
foreach($a as $url=>$n)
{
$d = memcache_get($this->memcache->memcache, "$url-time");
$avg = $d/$n;
$res[] = array($url, $n, $d, $avg);
}
usort($res, 'cmp');
echo '