Memcache::getExtendedStats
  memcache_get_extended_stats
  (PECL memcache >= 2.0.0)
Memcache::getExtendedStats -- memcache_get_extended_stats — Get statistics from all servers in pool
  
 
  Опис
  
   Memcache::getExtendedStats(
string $type = ?, 
int $slabid = ?, 
int $limit = 100): 
array 
  
  
  Зауваження: 
   
    This function has been added to Memcache version 2.0.0.
   
  
 
  
 
  Параметри
  
   
    
     - 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 typeset 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 typeset to 
       cachedump to limit the number of entries to dump.
 
Увага
    
     The cachedump stat type has been removed from the memcached daemon
     due to security reasons.
    
    
  
  
 
  Значення, що повертаються
  
   Returns a two-dimensional associative array of server statistics or false
   on failure.
  
  
 
  Приклади
  
   
    Приклад #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);
?>
     
    Поданий вище приклад
виведе:
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
)