SHOW HOSTS
The SHOW HOSTS statement shows the cluster information, including the port, status, leader, partition, and version information. You can also add the service type in the statement to view the information of the specific service.
Syntax
SHOW HOSTS [GRAPH | STORAGE | META];
note
For a NebulaGraph cluster installed with the source code, the version of the cluster will not be displayed in the output after executing the command SHOW HOSTS (GRAPH | STORAGE | META) with the service name.
Examples
nebula> SHOW HOSTS;
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
| "storaged0" | 9779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" | "<Var name="nebula_release" />" |
| "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "<Var name="nebula_release" />" |
| "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "<Var name="nebula_release" />" |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
nebula> SHOW HOSTS GRAPH;
+-----------+------+----------+---------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+-----------+------+----------+---------+--------------+---------+
| "graphd" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "<Var name="nebula_release" />" |
| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "<Var name="nebula_release" />" |
| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "<Var name="nebula_release" />" |
+-----------+------+----------+---------+--------------+---------+
nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+-------------+------+----------+-----------+--------------+---------+
| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "<Var name="nebula_release" />" |
| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "<Var name="nebula_release" />" |
| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "<Var name="nebula_release" />" |
+-------------+------+----------+-----------+--------------+---------+
nebula> SHOW HOSTS META;
+----------+------+----------+--------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+----------+------+----------+--------+--------------+---------+
| "metad2" | 9559 | "ONLINE" | "META" | "3ba41bd" | "<Var name="nebula_release" />" |
| "metad0" | 9559 | "ONLINE" | "META" | "3ba41bd" | "<Var name="nebula_release" />" |
| "metad1" | 9559 | "ONLINE" | "META" | "3ba41bd" | "<Var name="nebula_release" />" |
+----------+------+----------+--------+--------------+---------+