<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-logging-management-commands">
      </a>
      25.6.3.1 NDB Cluster Logging Management Commands
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045093482240">
  </a>
  <a class="indexterm" name="idm46045093480752">
  </a>
  <a class="indexterm" name="idm46045093479664">
  </a>
  <a class="indexterm" name="idm46045093478592">
  </a>
  <a class="indexterm" name="idm46045093477104">
  </a>
  <a class="indexterm" name="idm46045093476016">
  </a>
  <p>
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
    <span class="command">
     <strong>
      ndb_mgm
     </strong>
    </span>
   </a>
   supports a number of management
        commands related to the cluster log and node logs. In the
        listing that follows,
   <em class="replaceable">
    <code>
     node_id
    </code>
   </em>
   denotes
        either a storage node ID or the keyword
   <code class="literal">
    ALL
   </code>
   ,
        which indicates that the command should be applied to all of the
        cluster's data nodes.
  </p>
  <a class="indexterm" name="idm46045093471440">
  </a>
  <a class="indexterm" name="idm46045093470400">
  </a>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       CLUSTERLOG ON
      </code>
     </p>
     <p>
      Turns the cluster log on.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CLUSTERLOG OFF
      </code>
     </p>
     <p>
      Turns the cluster log off.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CLUSTERLOG INFO
      </code>
     </p>
     <p>
      Provides information about cluster log settings.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       CLUSTERLOG
       <em class="replaceable">
        <code>
         category
        </code>
       </em>
       =
       <em class="replaceable">
        <code>
         threshold
        </code>
       </em>
      </code>
     </p>
     <p>
      Logs
      <em class="replaceable">
       <code>
        category
       </code>
      </em>
      events with
            priority less than or equal to
      <em class="replaceable">
       <code>
        threshold
       </code>
      </em>
      in the cluster log.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CLUSTERLOG FILTER
       <em class="replaceable">
        <code>
         severity_level
        </code>
       </em>
      </code>
     </p>
     <p>
      Toggles cluster logging of events of the specified
      <em class="replaceable">
       <code>
        severity_level
       </code>
      </em>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   The following table describes the default setting (for all data
        nodes) of the cluster log category threshold. If an event has a
        priority with a value lower than or equal to the priority
        threshold, it is reported in the cluster log.
  </p>
  <a class="indexterm" name="idm46045093454656">
  </a>
  <a class="indexterm" name="idm46045093453152">
  </a>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    Events are reported per data node, and that the threshold can
          be set to different values on different nodes.
   </p>
  </div>
  <div class="table">
   <a name="idm46045093451136">
   </a>
   <p class="title">
    <b>
     Table 25.26 Cluster log categories, with default threshold setting
    </b>
   </p>
   <div class="table-contents">
    <table>
     <colgroup>
      <col style="width: 30%"/>
      <col style="width: 70%"/>
     </colgroup>
     <thead>
      <tr>
       <th>
        Category
       </th>
       <th>
        Default threshold (All data nodes)
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td>
        <code class="literal">
         STARTUP
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         SHUTDOWN
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         STATISTICS
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         CHECKPOINT
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         NODERESTART
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         CONNECTION
        </code>
       </td>
       <td>
        <code class="literal">
         8
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         ERROR
        </code>
       </td>
       <td>
        <code class="literal">
         15
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         INFO
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         BACKUP
        </code>
       </td>
       <td>
        <code class="literal">
         15
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         CONGESTION
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
      <tr>
       <td>
        <code class="literal">
         SCHEMA
        </code>
       </td>
       <td>
        <code class="literal">
         7
        </code>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
   <div class="table-contents">
    <table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 354px;">
     <thead>
      <tr>
       <th style="width: 105.812px;">
        Category
       </th>
       <th style="width: 246.906px;">
        Default threshold (All data nodes)
       </th>
      </tr>
     </thead>
    </table>
   </div>
  </div>
  <br class="table-break"/>
  <p>
   The
   <code class="literal">
    STATISTICS
   </code>
   category can provide a great
        deal of useful data. See
   <a class="xref" href="mysql-cluster-log-statistics.html" title="25.6.3.3 Using CLUSTERLOG STATISTICS in the NDB Cluster Management Client">
    Section 25.6.3.3, “Using CLUSTERLOG STATISTICS in the NDB Cluster Management Client”
   </a>
   , for more
        information.
  </p>
  <p>
   Thresholds are used to filter events within each category. For
        example, a
   <code class="literal">
    STARTUP
   </code>
   event with a priority of 3
        is not logged unless the threshold for
   <code class="literal">
    STARTUP
   </code>
   is set to 3 or higher. Only events
        with priority 3 or lower are sent if the threshold is 3.
  </p>
  <a class="indexterm" name="idm46045093409312">
  </a>
  <a class="indexterm" name="idm46045093407824">
  </a>
  <p>
   The following table shows the event severity levels.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    These correspond to Unix
    <code class="literal">
     syslog
    </code>
    levels,
          except for
    <code class="literal">
     LOG_EMERG
    </code>
    and
    <code class="literal">
     LOG_NOTICE
    </code>
    , which are not used or mapped.
   </p>
  </div>
  <div class="table">
   <a name="idm46045093403248">
   </a>
   <p class="title">
    <b>
     Table 25.27 Event severity levels
    </b>
   </p>
   <div class="table-contents">
    <table>
     <colgroup>
      <col style="width: 20%"/>
      <col style="width: 20%"/>
      <col style="width: 60%"/>
     </colgroup>
     <thead>
      <tr>
       <th scope="col">
        Severity Level Value
       </th>
       <th scope="col">
        Severity
       </th>
       <th scope="col">
        Description
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <th scope="row">
        1
       </th>
       <td>
        <code class="literal">
         ALERT
        </code>
       </td>
       <td>
        A condition that should be corrected immediately, such as a corrupted
              system database
       </td>
      </tr>
      <tr>
       <th scope="row">
        2
       </th>
       <td>
        <code class="literal">
         CRITICAL
        </code>
       </td>
       <td>
        Critical conditions, such as device errors or insufficient resources
       </td>
      </tr>
      <tr>
       <th scope="row">
        3
       </th>
       <td>
        <code class="literal">
         ERROR
        </code>
       </td>
       <td>
        Conditions that should be corrected, such as configuration errors
       </td>
      </tr>
      <tr>
       <th scope="row">
        4
       </th>
       <td>
        <code class="literal">
         WARNING
        </code>
       </td>
       <td>
        Conditions that are not errors, but that might require special handling
       </td>
      </tr>
      <tr>
       <th scope="row">
        5
       </th>
       <td>
        <code class="literal">
         INFO
        </code>
       </td>
       <td>
        Informational messages
       </td>
      </tr>
      <tr>
       <th scope="row">
        6
       </th>
       <td>
        <code class="literal">
         DEBUG
        </code>
       </td>
       <td>
        Debugging messages used for
        <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
         <code class="literal">
          NDBCLUSTER
         </code>
        </a>
        development
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <br class="table-break"/>
  <p>
   Event severity levels can be turned on or off (using
   <code class="literal">
    CLUSTERLOG FILTER
   </code>
   —see above). If a
        severity level is turned on, then all events with a priority
        less than or equal to the category thresholds are logged. If the
        severity level is turned off then no events belonging to that
        severity level are logged.
  </p>
  <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Important
   </div>
   <p>
    Cluster log levels are set on a per
    <a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
     <span class="command">
      <strong>
       ndb_mgmd
      </strong>
     </span>
    </a>
    , per subscriber basis. This means
          that, in an NDB Cluster with multiple management servers,
          using a
    <code class="literal">
     CLUSTERLOG
    </code>
    command in an instance
          of
    <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
     <span class="command">
      <strong>
       ndb_mgm
      </strong>
     </span>
    </a>
    connected to one management
          server affects only logs generated by that management server
          but not by any of the others. This also means that, should one
          of the management servers be restarted, only logs generated by
          that management server are affected by the resetting of log
          levels caused by the restart.
   </p>
  </div>
 </div>
 <br/>
</div>
