This information was originally posted by Evan Fribourg: http://lists.danga.com/pipermail/memcached/2006-March/002065.html
pid = process id
uptime = number of seconds since the process was started
time = current time
version = memcached version
rusage_user = seconds the cpu has devoted to the process as the user
rusage_system = seconds the cpu has devoted to the process as the system
curr_items = total number of items currently in memcache
total_items = total number of items that have passed through the cache
bytes = total number of bytes currently in use by curr_items
curr_connections = total number of open connections to memcached
connection_structures = ???
cmd_get = total GET commands issued to the server
cmd_set = total SET commands issued to the server
get_hits = total number of times a GET command was able to retrieve and
return data
get_misses = total number of times a GET command was unable to retrieve and
return data
bytes_read = total number of bytes input into the server
bytes_written = total number of bytes written by the server
limit_maxbytes = total storage bytes available to the server.
Memcache::getExtendedStats
(No version information available, might be only in CVS)
Memcache::getExtendedStats — Get statistics from all servers in pool
Descrição
Memcache::getExtendedStats() returns a two-dimensional associative array with server statistics. Array keys correspond to host:port of server and values contain the individual server statistics. A failed server will have its corresponding entry set to FALSE. You can also use the memcache_get_extended_stats() function.
Nota: This function has been added to Memcache version 2.0.0.
Parâmetros
- type
-
The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".
- slabid
-
Used in conjunction with type set to cachedump to identify the slab to dump from. The cachedump command ties up the server and is strictly to be used for debugging purposes.
- limit
-
Used in conjunction with type set to cachedump to limit the number of entries to dump. Default value is 100.
Valor Retornado
Returns a two-dimensional associative array of server statistics or FALSE on failure.
Exemplos
Exemplo #1 Memcache::getExtendedStats() example
<?php
$memcache_obj = new Memcache;
$memcache_obj->addServer('memcache_host', 11211);
$memcache_obj->addServer('failed_host', 11211);
$stats = $memcache_obj->getExtendedStats();
print_r($stats);
?>
O exemplo acima irá imprimir:
Array ( [memcache_host:11211] => Array ( [pid] => 3756 [uptime] => 603011 [time] => 1133810435 [version] => 1.1.12 [rusage_user] => 0.451931 [rusage_system] => 0.634903 [curr_items] => 2483 [total_items] => 3079 [bytes] => 2718136 [curr_connections] => 2 [total_connections] => 807 [connection_structures] => 13 [cmd_get] => 9748 [cmd_set] => 3096 [get_hits] => 5976 [get_misses] => 3772 [bytes_read] => 3448968 [bytes_written] => 2318883 [limit_maxbytes] => 33554432 ) [failed_host:11211] => false )
Memcache::getExtendedStats
25-Feb-2008 07:16
05-Mar-2007 05:15
Apparently, a notice-level error is raised when the memcache client discovers a failed memcached server. (mod_php 5.1.2 on Apache 2.2)
<?php
$memcache = new Memcache;
$memcache->addServer( 'good_host.example.com', 11211 );
$memcache->addServer( 'dead_host.example.com', 11211 );
// get stats for all servers
$stats = $memcache->getExtendedStats();
print_r( $stats );
?>
Output includes :
Notice: Memcache::getextendedstats() [function.getextendedstats.html]: marked server 'dead_host.example.com' as failed in memcache.php on line 12

Memcache::get