<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-threadstat">
      </a>
      25.6.17.64 The ndbinfo threadstat Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045087533696">
  </a>
  <p>
   The
   <code class="literal">
    threadstat
   </code>
   table provides a rough
        snapshot of statistics for threads running in the
   <code class="literal">
    NDB
   </code>
   kernel.
  </p>
  <p>
   The
   <code class="literal">
    threadstat
   </code>
   table contains the following
        columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       node_id
      </code>
     </p>
     <p>
      Node ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       thr_no
      </code>
     </p>
     <p>
      Thread ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       thr_nm
      </code>
     </p>
     <p>
      Thread name
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_loop
      </code>
     </p>
     <p>
      Number of loops in main loop
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_exec
      </code>
     </p>
     <p>
      Number of signals executed
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_wait
      </code>
     </p>
     <p>
      Number of times waiting for additional input
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_l_sent_prioa
      </code>
     </p>
     <p>
      Number of priority A signals sent to own node
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_l_sent_priob
      </code>
     </p>
     <p>
      Number of priority B signals sent to own node
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_r_sent_prioa
      </code>
     </p>
     <p>
      Number of priority A signals sent to remote node
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       c_r_sent_priob
      </code>
     </p>
     <p>
      Number of priority B signals sent to remote node
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_tid
      </code>
     </p>
     <p>
      OS thread ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_now
      </code>
     </p>
     <p>
      OS time (ms)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_utime
      </code>
     </p>
     <p>
      OS user CPU time (µs)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_stime
      </code>
     </p>
     <p>
      OS system CPU time (µs)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_minflt
      </code>
     </p>
     <p>
      OS page reclaims (soft page faults)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_majflt
      </code>
     </p>
     <p>
      OS page faults (hard page faults)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_nvcsw
      </code>
     </p>
     <p>
      OS voluntary context switches
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       os_ru_nivcsw
      </code>
     </p>
     <p>
      OS involuntary context switches
     </p>
    </li>
   </ul>
  </div>
  <h5>
   <a name="idm46045087494320">
   </a>
   Notes
  </h5>
  <p>
   <code class="literal">
    os_time
   </code>
   uses the system
   <code class="function">
    gettimeofday()
   </code>
   call.
  </p>
  <p>
   The values of the
   <code class="literal">
    os_ru_utime
   </code>
   ,
   <code class="literal">
    os_ru_stime
   </code>
   ,
   <code class="literal">
    os_ru_minflt
   </code>
   ,
   <code class="literal">
    os_ru_majflt
   </code>
   ,
   <code class="literal">
    os_ru_nvcsw
   </code>
   ,
        and
   <code class="literal">
    os_ru_nivcsw
   </code>
   columns are obtained using
        the system
   <code class="function">
    getrusage()
   </code>
   call, or the
        equivalent.
  </p>
  <p>
   Since this table contains counts taken at a given point in time,
        for best results it is necessary to query this table
        periodically and store the results in an intermediate table or
        tables. The MySQL Server's Event Scheduler can be employed
        to automate such monitoring. For more information, see
   <a class="xref" href="event-scheduler.html" title="27.4 Using the Event Scheduler">
    Section 27.4, “Using the Event Scheduler”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
