<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.getrusage.php',
    1 => 'getrusage',
    2 => 'Restituisce lo stato dell\'utilizzo delle risorse',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'PHP Options/Info Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.getopt.php',
    1 => 'getopt',
  ),
  'next' => 
  array (
    0 => 'function.ini-alter.php',
    1 => 'ini_alter',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/info/functions/getrusage.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.getrusage" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">getrusage</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">getrusage</span> &mdash; <span class="dc-title">Restituisce lo stato dell&#039;utilizzo delle risorse</span></p>

   </div>
   <div class="refsect1 unknown-88" id="refsect1-function.getrusage-unknown-88">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>getrusage</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$who</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

    <p class="para rdfs-comment">
    Questa funzione è un interfaccia a getrusage(2). Restituisce una matrice associativa
    contente le informazioni restituite dalla chiamata di sistema. Se il parametro
    <code class="parameter">who</code> vale 1, <span class="function"><strong>getrusage()</strong></span>sarà eseguita con RUSAGE_CHILDREN.
    </p>
    <p class="para">
     Tutte le informazioni sono accessibili tramite i nomi dei campi documentati.
    </p>
    <p class="para">
     <div class="example" id="example-1">
      <p><strong>Example #1 Esempio di uso di <span class="function"><strong>getrusage()</strong></span></strong></p>
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$dat </span><span style="color: #007700">= </span><span style="color: #0000BB">getrusage</span><span style="color: #007700">();<br />echo </span><span style="color: #0000BB">$dat</span><span style="color: #007700">[</span><span style="color: #DD0000">"ru_nswap"</span><span style="color: #007700">];         </span><span style="color: #FF8000">// numero di swap<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$dat</span><span style="color: #007700">[</span><span style="color: #DD0000">"ru_majflt"</span><span style="color: #007700">];        </span><span style="color: #FF8000">// numero di page faults<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$dat</span><span style="color: #007700">[</span><span style="color: #DD0000">"ru_utime.tv_sec"</span><span style="color: #007700">];  </span><span style="color: #FF8000">// tempo utente utilizzato (seconds)<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$dat</span><span style="color: #007700">[</span><span style="color: #DD0000">"ru_utime.tv_usec"</span><span style="color: #007700">]; </span><span style="color: #FF8000">// tempo utente utilizzato (microseconds)<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </div>
     Per maggior dettagli si veda la pagina di getrusage(2) nel manuale del proprio  sistema.
    </p>
    <blockquote class="note"><p><strong class="note">Nota</strong>: <span class="simpara">Questa funzione non è
implementata sulle piattaforme Windows.</span></p></blockquote>
   </div>

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