Documentation Home
MySQL Cluster Manager 9.0 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


5.2.9 The list hosts Command

list hosts [--verbose|-v]  site_name

The list hosts command is used to obtain a list of the hosts comprising a given management site. The command requires a single argument, the name of the site to be examined. For each host listed, the information returned includes the hostname, status, and version of the management agent software in use, as shown in this example:

mcm> list hosts mysite;
+-----------+-----------+---------+
| Host      | Status    | Version |
+-----------+-----------+---------+
| tonfisk   | Available | 9.0.1  |
| flundra   | Available | 9.0.1  |
+-----------+-----------+---------+
2 rows in set (0.16 sec)

Status can be one of :

  • Available: Agent on the host is active

  • Recovery: Agent on the host is in the process of recovering itself

  • Unresponsive: Agent on the host rejected an attempt to connect

  • Unavailable: Agent on the host is unreachable

If an agent is reported persistently as Unresponsive or Unavailable, you may have to restart it.

If you omit the site_name argument, the command fails with an error, as shown here:

mcm> list hosts;
ERROR 6 (00MGR): Illegal number of operands

Using the --verbose option (short form : -v) causes the command to print additional information on the hosts:

mcm> list hosts --verbose mysite;
+---------+-----------+---------+-------+---------+--------------------------+
| Host    | Status    | Version | Cores | Memory  | OS                       |
+---------+-----------+---------+-------+---------+--------------------------+
| tonfisk | Available | 9.0.1  | 1     | 1819 Mb | Linux 4.15.0-147-generic |
| flundra | Available | 9.0.1  | 1     | 1819 Mb | Linux 4.15.0-147-generic |
+---------+-----------+---------+-------+---------+--------------------------+
2 rows in set (0.07 sec)