PHP Doku:: Get server pool statistics - memcached.getstats.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige DiensteMemcachedThe Memcached classMemcached::getStats

Ein Service von Reinhard Neidl - Webprogrammierung.

The Memcached class

<<Memcached::getServerList

Memcached::getVersion>>

Memcached::getStats

(PECL memcached >= 0.1.0)

Memcached::getStatsGet server pool statistics

Beschreibung

public array Memcached::getStats ( void )

Memcached::getStats() returns an array containing the state of all available memcache servers. See » memcache protocol specification for details on these statistics.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Array of server statistics, one entry per server.

Beispiele

Beispiel #1 Memcached::getStats() example

<?php
$m 
= new Memcached();
$m->addServer('localhost'11211);

print_r($m->getStats());
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Array
(
    [localhost:11211] => Array
        (
            [pid] => 4933
            [uptime] => 786123
            [threads] => 1
            [time] => 1233868010
            [pointer_size] => 32
            [rusage_user_seconds] => 0
            [rusage_user_microseconds] => 140000
            [rusage_system_seconds] => 23
            [rusage_system_microseconds] => 210000
            [curr_items] => 145
            [total_items] => 2374
            [limit_maxbytes] => 67108864
            [curr_connections] => 2
            [total_connections] => 151
            [connection_structures] => 3
            [bytes] => 20345
            [cmd_get] => 213343
            [cmd_set] => 2381
            [get_hits] => 204223
            [get_misses] => 9120
            [evictions] => 0
            [bytes_read] => 9092476
            [bytes_written] => 15420512
            [version] => 1.2.6
        )

)


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
ar knownat plista with com
17.12.2009 20:13
The method currently does not support the optional (and subject to change) type parameter for the stats command:
 - "items", "sizes", "slabs"

The documentation for the optional parameters can be found here (sections below General-purpose statistics):
http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt

The Memcache Extension can be uses to retrieve that information:
http://www.php.net/manual/en/function.memcache-getstats.php



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)