4.4.6 The show status Command

show status --cluster|-c cluster_name
show status --operation|-o cluster_name
show status --backup|-b cluster_name
show status --process|-r cluster_name

This command is used to check the status of clusters, cluster processes, backups, and commands issued in the MySQL Cluster Manager client. The type of status returned depends on which of the four options of --cluster (short form: -c), --operation (short form: -o), --backup (short form: -b), or --process (short form -r) is used with the command. (If none of these is used, --cluster is assumed.) These options are described in more detail in the next few paragraphs.

--cluster option.  When this option is used, show status reports on the status of the cluster named cluster_name, as shown in this example:

mcm> show status --cluster mycluster;
+-----------+-------------------+---------+
| Cluster   | Status            | Comment |
+-----------+-------------------+---------+
| mycluster | fully operational |         |
+-----------+-------------------+---------+
1 row in set (0.01 sec)

When used with the --cluster option (short form: -c), the output of this command consist of two columns. The Cluster column contains the name of the cluster. The Status column contains a description of the cluster's status; possible values and their meanings are shown in the following table:

Status ValueMeaning
fully operationalAll cluster processes are running.
operationalAll node groups are up and running, but at least one data node process (ndbd or ndbmtd) is not running. The cluster is online, but you should determine why any missing data nodes are not running and correct the problem as soon as possible.
non-operationalThe cluster is not operational, because at least one node group is offline. You must investigate and fix the problem or problems, then restart the cluster, before the cluster can be used for data storage and retrieval operations.
stoppedThe cluster is not running, because it has been stopped by the user. This normally does not indicate any problem as such, but you must restart the cluster before it can be used by any applications.
createdThe cluster has been created successfully using the create cluster command, but has never been started. You must start the cluster using the start cluster command before you can make use of it.
unknownThe MySQL Cluster Manager was unable to determine the cluster's status. This may or may not indicate a problem with the cluster; it is possible that the problem lies with one or more MySQL Cluster Manager agents or the MySQL Cluster Manager client. You should attempt to determine the status of the cluster by other means, such as using show status --process in the MySQL Cluster Manager client (described later in this section), or employing one of the commands available in the ndb_mgm client (see ndb_mgm — The MySQL Cluster Management Client) such as SHOW or ALL STATUS.

--operation option.  When the --operation option (short form: -o) is used, it causes SHOW STATUS to display the status of the latest command to be executed. This includes commands that were issued using the --background option (short form -bg). An example of this command is shown here:

mcm> show status --operation mycluster;
+-----------------+-----------+--------------+
| Command         | Status    | Description  |
+-----------------+-----------+--------------+
| restart cluster | executing | <no message> |
+-----------------+-----------+--------------+
1 row in set (1.60 sec)

The output contains 3 columns, described in the following list:

Possible values for the Status column, together with descriptions of these values, are shown in the following table:

Status ValueDescription
executingMySQL Cluster Manager is executing the command, but has not yet completed doing so.
finishedThe command has executed (and completed) successfully.
failedThe command failed to execute. The Description column may contain information about the reason for the failure.
unknownMySQL Cluster Manager was unable to determine the status of this command.

--backup option.  When this option is used, show status reports on the status of the backup process for the cluster named cluster_name, as shown in the following examples:

mcm> show status --backup mycluster;
+-----------------------------------------+
| Command result                          |
+-----------------------------------------+
| No backup currently active in mycluster |
+-----------------------------------------+
1 row in set (0.05 sec)

mcm> show status --backup mycluster;
+-----------------------------------------+
| Command result                          |
+-----------------------------------------+
| BackupId 5 currently active in mycluster|
+-----------------------------------------+
1 row in set (0.09 sec)

--process option.  When run with this option, show status returns information about each process in the cluster named cluster_name, as shown in this example:

mcm> show status --process mycluster;
+------+----------+----------+---------+-----------+
| Id   | Process  | Host     | Status  | Nodegroup |
+------+----------+----------+---------+-----------+
| 1    | ndb_mgmd | tonfisk  | running |           |
| 2    | ndbd     | flundra  | running | 0         |
| 3    | ndbd     | grindval | running | 0         |
| 4    | mysqld   | lax      | running |           |
+------+----------+----------+---------+-----------+
4 rows in set (1.67 sec)

When the --process option (short form: -r) is used with show status, the output contains 5 columns, described in the following list:

Possible values for the Status column are shown in the following table, together with a description of what this value represents:

Status ValueMeaning
runningThe process is running normally.
stoppedThe process has been stopped by the user.
addedThe process has been added to the cluster, but not yet started.
startingThe process has been started, but is not yet fully running. (For data nodes, you can determine which start phase the node is currently in by using the status command in the ndb_mgm client.)
stoppingThe process has received a command to stop, and is now shutting down.
failedThe process has shut down unexpectedly (likely to have crashed). You should determine the cause for this unplanned shutdown, fix the problem, and restart the process as soon as possible.
importThe process is part of a cluster that was created for import, but the actual migration of processes and data from the original cluster has not yet taken place. start process and stop process commands fail for this process until this migration has occurred.
unknownMySQL Cluster Manager is unable to establish the current status of this process. You should try to determine its status using other means.

You must supply the name of an existing cluster with this command, or else show status fails with an error, as shown here:

mcm> show status;
ERROR 6 (00MGR): Illegal number of operands

mcm> show status -c nosuchcluster;
ERROR 5001 (00MGR): Cluster nosuchcluster not defined
Important

Do not confuse this command with the MySQL SHOW STATUS statement, which has a different syntax, and which can be used only in the standard mysql client. The MySQL Cluster Manager client command accepts only those options shown at the beginning of this section, and does not accept a LIKE or WHERE clause.