# SHOW CLUSTER STATUS

Shows information about partitions within a cluster including replication role, replication state, and replication position, across all databases.

## Syntax

```sql
SHOW CLUSTER STATUS;

```

## Remarks

* This command must be run on the master aggregator or a child aggregator node (see [Node Requirements for SingleStore Commands](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands.md)).
* Refer to the [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md) for the required permissions.

## Table description

| Field                      | Data Type (Size) | Description                                               | Example Value                                    |
| -------------------------- | ---------------- | --------------------------------------------------------- | ------------------------------------------------ |
| NODE\_ID                   | bigint(10)       | ID of node.                                               | 1                                                |
| HOST                       | varchar(512)     | Host of the node                                          | 127.0.0.1                                        |
| PORT                       | bigint(10)       | The port of the node                                      | 10000                                            |
| DATABASE\_NAME             | varchar(512)     | Name of database                                          | Transaction\_Source                              |
| ROLE                       | varchar(512)     | Database’s role (e.g. orphan, master, replica, reference) | master                                           |
| STATE                      | varchar(256)     | Database state                                            | replicating                                      |
| POSITION                   | varchar(256)     | Position in transaction log                               | 0:8832                                           |
| MASTER\_HOST               | varchar(256)     | Host of this node’s aggregator                            | 127.0.0.1                                        |
| MASTER\_PORT               | bigint(10)       | Port of this node’s aggregator                            | 127.0.0.1                                        |
| METADATA\_MASTER\_NODE\_ID | bigint(10)       | Master’s node ID expected by metadata.                    | 1                                                |
| METADATA\_MASTER\_HOST     | varchar(256)     | Master’s host expected by metadata.                       | 127.0.0.1                                        |
| METADATA\_MASTER\_PORT     | bigint(10)       | Master’s port expected by metadata                        | 3306                                             |
| METADATA\_ROLE             | varchar(512)     | Database’s role based on metadata                         | Orphan                                           |
| DETAILS                    | varchar(512)     | Extra details                                             | stage: packet wait, state: x\_streaming, err: no |

## Sample output

```sql

SELECT * FROM information_schema.MV_CLUSTER_STATUS

```

```output

+---------+-----------+-------+---------------------------+---------------+-------------+----------+-------------+-------------+-------------------------+----------------------+----------------------+---------------+-------------------------------------------------+
| NODE_ID | HOST      | PORT  | DATABASE_NAME             | ROLE          | STATE       | POSITION | MASTER_HOST | MASTER_PORT | METADATA_MASTER_NODE_ID | METADATA_MASTER_HOST | METADATA_MASTER_PORT | METADATA_ROLE | DETAILS                                         |
+---------+-----------+-------+---------------------------+---------------+-------------+----------+-------------+-------------+-------------------------+----------------------+----------------------+---------------+-------------------------------------------------+
|       1 | 127.0.0.1 | 10000 | cluster                   | master        | online      | 0:46     | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Reference     |                                                 |
|       1 | 127.0.0.1 | 10000 | monitoring                | master        | online      | 0:8832   | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Reference     |                                                 |
|       1 | 127.0.0.1 | 10000 | vigilantia                | master        | online      | 0:24616  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Reference     |                                                 |
|       3 | 127.0.0.1 | 10001 | cluster                   | async replica | replicating | 0:45     | 127.0.0.1   |       10000 |                       1 | 127.0.0.1            |                10000 | Reference     | stage: packet wait, state: x_streaming, err: no |
|       3 | 127.0.0.1 | 10001 | monitoring                | sync replica  | replicating | 0:8832   | 127.0.0.1   |       10000 |                       1 | 127.0.0.1            |                10000 | Reference     |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_0              | master        | online      | 0:58893  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_0_AUTO_REPLICA | async replica | replicating | 0:58893  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_1              | master        | online      | 0:57439  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_1_AUTO_REPLICA | async replica | replicating | 0:57439  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_2              | master        | online      | 0:49952  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | monitoring_2_AUTO_REPLICA | async replica | replicating | 0:49952  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia                | sync replica  | replicating | 0:24616  | 127.0.0.1   |       10000 |                       1 | 127.0.0.1            |                10000 | Reference     |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_0              | master        | online      | 0:25874  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_0_AUTO_REPLICA | async replica | replicating | 0:25874  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_1              | master        | online      | 0:25874  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_1_AUTO_REPLICA | async replica | replicating | 0:25874  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_2              | master        | online      | 0:25874  | NULL        |        NULL |                    NULL | NULL                 |                 NULL | Master        |                                                 |
|       3 | 127.0.0.1 | 10001 | vigilantia_2_AUTO_REPLICA | async replica | replicating | 0:25874  | 127.0.0.1   |       10001 |                    NULL | NULL                 |                 NULL | Orphan        |                                                 |
+---------+-----------+-------+---------------------------+---------------+-------------+----------+-------------+-------------+-------------------------+----------------------+----------------------+---------------+-------------------------------------------------+

```

***

Modified at: January 9, 2023

Source: [/db/v9.1/reference/sql-reference/cluster-management-commands/show-cluster-status/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/show-cluster-status/)

(An index of the documentation is available at /llms.txt)
