Rechercher dans le manuel MySQL

22.5.10.28 The ndbinfo nodes Table

This table contains information on the status of data nodes. For each data node that is running in the cluster, a corresponding row in this table provides the node's node ID, status, and uptime. For nodes that are starting, it also shows the current start phase.

The following table provides information about the columns in the nodes table. For each column, the table shows the name, data type, and a brief description. Additional information can be found in the notes following the table.

Table 22.402 Columns of the nodes table

Column Name Type Description
node_id integer The data node's unique node ID in the cluster.
uptime integer Time since the node was last started, in seconds.
status string Current status of the data node; see text for possible values.
start_phase integer If the data node is starting, the current start phase.
config_generation integer The version of the cluster configuration file in use on this data node.

The uptime column shows the time in seconds that this node has been running since it was last started or restarted. This is a BIGINT value. This figure includes the time actually needed to start the node; in other words, this counter starts running the moment that ndbd or ndbmtd is first invoked; thus, even for a node that has not yet finished starting, uptime may show a nonzero value.

The status column shows the node's current status. This is one of: NOTHING, CMVMI, STARTING, STARTED, SINGLEUSER, STOPPING_1, STOPPING_2, STOPPING_3, or STOPPING_4. When the status is STARTING, you can see the current start phase in the start_phase column (see later in this section). SINGLEUSER is displayed in the status column for all data nodes when the cluster is in single user mode (see Section 22.5.8, “NDB Cluster Single User Mode”). Seeing one of the STOPPING states does not necessarily mean that the node is shutting down but can mean rather that it is entering a new state. For example, if you put the cluster in single user mode, you can sometimes see data nodes report their state briefly as STOPPING_2 before the status changes to SINGLEUSER.

The start_phase column uses the same range of values as those used in the output of the ndb_mgm client node_id STATUS command (see Section 22.5.2, “Commands in the NDB Cluster Management Client”). If the node is not currently starting, then this column shows 0. For a listing of NDB Cluster start phases with descriptions, see Section 22.5.1, “Summary of NDB Cluster Start Phases”.

The config_generation column shows which version of the cluster configuration is in effect on each data node. This can be useful when performing a rolling restart of the cluster in order to make changes in configuration parameters. For example, from the output of the following SELECT statement, you can see that node 3 is not yet using the latest version of the cluster configuration (6) although nodes 1, 2, and 4 are doing so:

  1. mysql> USE ndbinfo;
  2. Database changed
  3. mysql> SELECT * FROM nodes;
  4. +---------+--------+---------+-------------+-------------------+
  5. | node_id | uptime | status  | start_phase | config_generation |
  6. +---------+--------+---------+-------------+-------------------+
  7. |       1 |  10462 | STARTED |           0 |                 6 |
  8. |       2 |  10460 | STARTED |           0 |                 6 |
  9. |       3 |  10457 | STARTED |           0 |                 5 |
  10. |       4 |  10455 | STARTED |           0 |                 6 |
  11. +---------+--------+---------+-------------+-------------------+
  12. 2 rows in set (0.04 sec)

Therefore, for the case just shown, you should restart node 3 to complete the rolling restart of the cluster.

Nodes that are stopped are not accounted for in this table. Suppose that you have an NDB Cluster with 4 data nodes (node IDs 1, 2, 3 and 4), and all nodes are running normally, then this table contains 4 rows, 1 for each data node:

  1. mysql> USE ndbinfo;
  2. Database changed
  3. mysql> SELECT * FROM nodes;
  4. +---------+--------+---------+-------------+-------------------+
  5. | node_id | uptime | status  | start_phase | config_generation |
  6. +---------+--------+---------+-------------+-------------------+
  7. |       1 |  11776 | STARTED |           0 |                 6 |
  8. |       2 |  11774 | STARTED |           0 |                 6 |
  9. |       3 |  11771 | STARTED |           0 |                 6 |
  10. |       4 |  11769 | STARTED |           0 |                 6 |
  11. +---------+--------+---------+-------------+-------------------+
  12. 4 rows in set (0.04 sec)

If you shut down one of the nodes, only the nodes that are still running are represented in the output of this SELECT statement, as shown here:

ndb_mgm> 2 STOP
Node 2: Node shutdown initiated
Node 2: Node shutdown completed.
Node 2 has shutdown.
  1. mysql> SELECT * FROM nodes;
  2. +---------+--------+---------+-------------+-------------------+
  3. | node_id | uptime | status  | start_phase | config_generation |
  4. +---------+--------+---------+-------------+-------------------+
  5. |       1 |  11807 | STARTED |           0 |                 6 |
  6. |       3 |  11802 | STARTED |           0 |                 6 |
  7. |       4 |  11800 | STARTED |           0 |                 6 |
  8. +---------+--------+---------+-------------+-------------------+
  9. 3 rows in set (0.02 sec)

Rechercher dans le manuel MySQL

Traduction non disponible

Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-mysql-cluster-ndbinfo-nodes.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :en Manuel MySQL : https://dev.mysql.com/

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut