show status --cluster|-c cluster_name
show status --operation|-o cluster_name
show status --backup|-b cluster_name
show status --process|-r cluster_name
show status --progress cluster_name
show status --progressbar 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:
Table 5.1 Status values shown by show status --cluster
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. |
failed |
All processes in the cluster have exited, but, unlike
stopped , some nodes did not exit
cleanly (only for MySQL Cluster Manager 8.0.28 and
later). |
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 NDB 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
-B
).
An example of this command is shown here:
mcm> show status --operation mycluster;
+---------------+----------+------------------------+
| Command | Status | Description |
+---------------+----------+------------------------+
| start cluster | finished | Completed successfully |
+---------------+----------+------------------------+
1 row in set (0.10 sec)
The output contains 3 columns, described in the following list:
Command
. The text of the command last issued (previous to theshow 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
. Depending on the command and its status, this column may contain additional information. Otherwise,No information available
is displayed here.
Possible values for the Status
column,
together with descriptions of these values, are shown in the
following table:
Table 5.2 Status values shown by show status --operation
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. |
--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:
Id
. This is the node ID of the process as a node in clustercluster_name
.Process
. The type of process, that is, the name of the corresponding MySQL NDB Cluster executable. Allowed values arendb_mgmd
,ndbd
,ndbmtd
, andmysqld
.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 theProcess
isndbd
orndbmtd
—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 ofProcess
, 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:
Table 5.3 Status values shown by show status --process
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. |
connected |
The ndbapi or mysqld process is
connected to the cluster. |
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. |
import |
The 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. |
unknown |
MySQL Cluster Manager is unable to establish the current status of this process. You should try to determine its status using other means. |
--progress
option
When run with this option, show status
returns, when available, progress on the current action of
mcmd on the cluster named
cluster_name
, in terms of the
percentage of the total number of steps completed:
mcm> show status --progress mycluster;
+-----------------+-----------+----------+
| Command | Status | Progress |
+-----------------+-----------+----------+
| restore cluster | executing | 47% |
+-----------------+-----------+----------+
1 row in set (0.02 sec)
--progressbar
option
The option provides the same function as the
--progress
option,
but also adds an ASCII-art progress bar:
mcm> show status --progressbar mycluster;
+-----------------+-----------+-----------------------------+
| Command | Status | Progress |
+-----------------+-----------+-----------------------------+
| restore cluster | executing | 47% [######### ] |
+-----------------+-----------+-----------------------------+
1 row in set (0.02 sec)
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 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.