show status --cluster|-ccluster_nameshow status --operation|-ocluster_nameshow status --process|-rcluster_name
This command is used to check the status of clusters, cluster
processes, and commands issued in the MySQL Cluster Manager client. The type of
status returned depends on which of the three options
--cluster (short form: -c),
--operation (short form: -o), 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 |
+-----------+-------------------+
| mycluster | fully operational |
+-----------+-------------------+
1 row in set (1.94 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 Value |
Meaning |
|---|---|
fully operational |
All cluster processes are running. |
operational |
All 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-operational |
The 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. |
stopped |
The 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. |
created |
The 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. |
unknown |
The 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:
Command.
The text of the command last issued (previous to the
show status
command), less any options or arguments.
--operation
Status.
The current state of the command. Possible values and their
meanings are listed later in this section.
Description.
In some cases, depending on the command and its status, this
column may contain additional information. Otherwise,
<no message> is displayed here.
Possible values for the Status column, together
with descriptions of these values, are shown in the following
table:
Status Value |
Description |
|---|---|
executing |
MySQL Cluster Manager is executing the command, but has not yet completed doing so. |
finished |
The command has executed (and completed) successfully. |
failed |
The command failed to execute. The Description column
may contain information about the reason for the failure. |
unknown |
MySQL Cluster Manager was unable to determine the status of this command. |
--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:
Id.
This is the node ID of the process as a node in cluster
cluster_name.
Process.
The type of process, that is, the name of the corresponding
MySQL Cluster executable. Allowed values are
ndb_mgmd, ndbd,
ndbmtd, and mysqld.
Host.
The hostname or IP address of the computer where the process
is running.
Status.
The state or condition of this process. Possible values for
this column are given later in this section.
Nodegroup.
If the Process is ndbd
or ndbmtd—that is, if the process
is a data node process—then this column shows the ID
of the node group to which the process belongs. For any
other value of Process, this column is
empty.
Possible values for the Status column are shown
in the following table, together with a description of what this
value represents:
Status Value |
Meaning |
|---|---|
running |
The process is running normally. |
stopped |
The process has been stopped by the user. |
added |
The process has been added to the cluster, but not yet started. |
starting |
The 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.) |
stopping |
The process has received a command to stop, and is now shutting down. |
failed |
The 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. |
unknown |
MySQL 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
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.
