Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 259.0Kb
Man Pages (Zip) - 366.2Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


25.6.17.48 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.

Thenodes table contains the following columns:

  • node_id

    The data node's unique node ID in the cluster.

  • uptime

    Time since the node was last started, in seconds.

  • status

    Current status of the data node; see text for possible values.

  • start_phase

    If the data node is starting, the current start phase.

  • config_generation

    The version of the cluster configuration file in use on this data node.

Notes

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

Thestatus column shows the node's current status. This is one of:NOTHING,CMVMI,STARTING,STARTED,SINGLEUSER,STOPPING_1,STOPPING_2,STOPPING_3, orSTOPPING_4. When the status isSTARTING, you can see the current start phase in thestart_phase column (see later in this section).SINGLEUSER is displayed in thestatus column for all data nodes when the cluster is in single user mode (seeSection 25.6.6, “NDB Cluster Single User Mode”). Seeing one of theSTOPPING 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 asSTOPPING_2 before the status changes toSINGLEUSER.

Thestart_phase column uses the same range of values as those used in the output of thendb_mgm clientnode_id STATUS command (seeSection 25.6.1, “Commands in the NDB Cluster Management Client”). If the node is not currently starting, then this column shows0. For a listing of NDB Cluster start phases with descriptions, seeSection 25.6.4, “Summary of NDB Cluster Start Phases”.

Theconfig_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 followingSELECT 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:

mysql> USE ndbinfo;Database changedmysql> SELECT * FROM nodes;+---------+--------+---------+-------------+-------------------+| node_id | uptime | status  | start_phase | config_generation |+---------+--------+---------+-------------+-------------------+|       1 |  10462 | STARTED |           0 |                 6 ||       2 |  10460 | STARTED |           0 |                 6 ||       3 |  10457 | STARTED |           0 |                 5 ||       4 |  10455 | STARTED |           0 |                 6 |+---------+--------+---------+-------------+-------------------+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:

mysql> USE ndbinfo;Database changedmysql> SELECT * FROM nodes;+---------+--------+---------+-------------+-------------------+| node_id | uptime | status  | start_phase | config_generation |+---------+--------+---------+-------------+-------------------+|       1 |  11776 | STARTED |           0 |                 6 ||       2 |  11774 | STARTED |           0 |                 6 ||       3 |  11771 | STARTED |           0 |                 6 ||       4 |  11769 | STARTED |           0 |                 6 |+---------+--------+---------+-------------+-------------------+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 thisSELECT statement, as shown here:

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