<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.memcache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'memcache.getextendedstats.php',
    1 => 'Memcache::getExtendedStats',
    2 => 'R&eacute;cup&egrave;re des statistiques de tous les serveurs dans la liste',
  ),
  'up' => 
  array (
    0 => 'class.memcache.php',
    1 => 'Memcache',
  ),
  'prev' => 
  array (
    0 => 'memcache.get.php',
    1 => 'Memcache::get',
  ),
  'next' => 
  array (
    0 => 'memcache.getserverstatus.php',
    1 => 'Memcache::getServerStatus',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/memcache/memcache/getextendedstats.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="memcache.getextendedstats" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcache::getExtendedStats</h1>
  <h1 class="refname">memcache_get_extended_stats</h1>
  <p class="verinfo">(PECL memcache &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Memcache::getExtendedStats</span> -- <span class="refname">memcache_get_extended_stats</span> &mdash; <span class="dc-title">Récupère des statistiques de tous les serveurs dans la liste</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcache.getextendedstats-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>Memcache::getExtendedStats</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$type</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$slabid</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$limit</code><span class="initializer"> = 100</span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <div class="methodsynopsis dc-description"><span class="methodname"><strong>memcache_get_extended_stats</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.memcache.php" class="type Memcache">Memcache</a></span> <code class="parameter">$memcache</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$type</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$slabid</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$limit</code><span class="initializer"> = 100</span></span><br>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>


  <p class="simpara">
   <span class="function"><strong>Memcache::getExtendedStats()</strong></span> retourne un tableau
   associatif à deux dimensions avec des statistiques de serveurs. Les clés
   des tableaux correspondent à hôte:port des serveurs et les valeurs
   contiennent des statistiques du serveur individuel. Un serveur en échec
   aura ses entrées correspondantes fixées à <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>

  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    Cette fonction a été ajoutée à la version de Memcache 2.0.0.
   </span>
  </p></blockquote>

 </div>


 <div class="refsect1 parameters" id="refsect1-memcache.getextendedstats-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">type</code></dt>
     <dd>
      <span class="simpara">
       Le type de statistiques à récupérer. Les valeurs valides sont : <code class="literal">&quot;reset&quot;</code>,
       <code class="literal">&quot;malloc&quot;</code>, <code class="literal">&quot;maps&quot;</code>, <code class="literal">&quot;cachedump&quot;</code>,
       <code class="literal">&quot;slabs&quot;</code>, <code class="literal">&quot;items&quot;</code>, <code class="literal">&quot;sizes&quot;</code>.
       Suivant les spécifications du protocole memcached, ces arguments optionnels sont susceptibles
       d&#039;être modifiés suivant les besoins des développeurs de memcache.
      </span>
     </dd>
    
    
     <dt><code class="parameter">slabid</code></dt>
     <dd>
      <span class="simpara">
       Utilisé avec le paramètre <code class="parameter">type</code> défini à cachedump
       pour identifier le slab à récupérer. La commande cachedump
       met à mal le serveur et ne doit être utilisée que dans un but de débogage.
      </span>
     </dd>
    
    
     <dt><code class="parameter">limit</code></dt>
     <dd>
      <span class="simpara">
       Utilisé avec le paramètre <code class="parameter">type</code> défini à
       cachedump pour limiter le nombre d&#039;entrées à récupérer.
      </span>
     </dd>
    
   </dl>
   <div class="warning"><strong class="warning">Avertissement</strong>
    <p class="simpara">
     Le type de statistique cachedump a été supprimé du processus
     memcached pour des contraintes de sécurité.
    </p>
   </div>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-memcache.getextendedstats-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="simpara">
   Retourne un tableau associatif avec des statistiques des serveurs ou
   <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en cas d&#039;erreur.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-memcache.getextendedstats-examples">
  <h3 class="title">Exemples</h3>
  <div class="example" id="example-1">
   <p><strong>Exemple #1 Exemple avec <span class="function"><strong>Memcache::getExtendedStats()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />    $memcache_obj </span><span style="color: #007700">= new </span><span style="color: #0000BB">Memcache</span><span style="color: #007700">;<br />    </span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">'memcache_host'</span><span style="color: #007700">, </span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">'failed_host'</span><span style="color: #007700">, </span><span style="color: #0000BB">11211</span><span style="color: #007700">);<br /><br />    </span><span style="color: #0000BB">$stats </span><span style="color: #007700">= </span><span style="color: #0000BB">$memcache_obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getExtendedStats</span><span style="color: #007700">();<br />    </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$stats</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [memcache_host:11211] =&gt; Array
        (
            [pid] =&gt; 3756
            [uptime] =&gt; 603011
            [time] =&gt; 1133810435
            [version] =&gt; 1.1.12
            [rusage_user] =&gt; 0.451931
            [rusage_system] =&gt; 0.634903
            [curr_items] =&gt; 2483
            [total_items] =&gt; 3079
            [bytes] =&gt; 2718136
            [curr_connections] =&gt; 2
            [total_connections] =&gt; 807
            [connection_structures] =&gt; 13
            [cmd_get] =&gt; 9748
            [cmd_set] =&gt; 3096
            [get_hits] =&gt; 5976
            [get_misses] =&gt; 3772
            [bytes_read] =&gt; 3448968
            [bytes_written] =&gt; 2318883
            [limit_maxbytes] =&gt; 33554432
        )

    [failed_host:11211] =&gt; false
)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-memcache.getextendedstats-seealso">
  <h3 class="title">Voir aussi</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="memcache.getversion.php" class="function" rel="rdfs-seeAlso">Memcache::getVersion()</a> - Retourne le num&eacute;ro de version du serveur</span></li>
   <li><span class="function"><a href="memcache.getstats.php" class="function" rel="rdfs-seeAlso">Memcache::getStats()</a> - Lit les statistiques du serveur</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>