3.3.4 检查Cluster状态
使用MySQL Cluster管理器,你可以检查一下若干层次的状态:
● Cluster整体状态。
● 每个主机状态(特别是主机上的代理是否运行和可访问)
● 组成Cluster的每个节点(进程)的状态。
mcm> show status --cluster mycluster;
+-----------+-------------------+
| Cluster | Status |
+-----------+-------------------+
| mycluster | fully-operational |
+-----------+-------------------+
mcm> list hosts mysite;
+--------------+-----------+---------+
| Host | Status | Version |
+--------------+-----------+---------+
| 192.168.0.10 | Available | 1.0.1 |
| 192.168.0.11 | Available | 1.0.1 |
| 192.168.0.12 | Available | 1.0.1 |
| 192.168.0.13 | Available | 1.0.1 |
+--------------+-----------+---------+
mcm> show status --process mycluster;
+------+----------+--------------+---------+-----------+
| Id | Process | Host | Status | Nodegroup |
+------+----------+--------------+---------+-----------+
| 1 | ndb_mgmd | 192.168.0.10 | running | |
| 2 | ndb_mgmd | 192.168.0.11 | running | |
| 3 | ndbd | 192.168.0.12 | running | 0 |
| 4 | ndbd | 192.168.0.13 | running | 0 |
| 5 | ndbd | 192.168.0.12 | running | 1 |
| 6 | ndbd | 192.168.0.13 | running | 1 |
| 7 | mysqld | 192.168.0.10 | running | |
| 8 | mysqld | 192.168.0.11 | running | |
+------+----------+--------------+---------+-----------+
+-----------+-------------------+
| Cluster | Status |
+-----------+-------------------+
| mycluster | fully-operational |
+-----------+-------------------+
mcm> list hosts mysite;
+--------------+-----------+---------+
| Host | Status | Version |
+--------------+-----------+---------+
| 192.168.0.10 | Available | 1.0.1 |
| 192.168.0.11 | Available | 1.0.1 |
| 192.168.0.12 | Available | 1.0.1 |
| 192.168.0.13 | Available | 1.0.1 |
+--------------+-----------+---------+
mcm> show status --process mycluster;
+------+----------+--------------+---------+-----------+
| Id | Process | Host | Status | Nodegroup |
+------+----------+--------------+---------+-----------+
| 1 | ndb_mgmd | 192.168.0.10 | running | |
| 2 | ndb_mgmd | 192.168.0.11 | running | |
| 3 | ndbd | 192.168.0.12 | running | 0 |
| 4 | ndbd | 192.168.0.13 | running | 0 |
| 5 | ndbd | 192.168.0.12 | running | 1 |
| 6 | ndbd | 192.168.0.13 | running | 1 |
| 7 | mysqld | 192.168.0.10 | running | |
| 8 | mysqld | 192.168.0.11 | running | |
+------+----------+--------------+---------+-----------+