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