Skip to content

SHOW HOSTS

The SHOW HOSTS statement shows the host and version information of Graph Service, Storage Service, and Meta Service.

Syntax

SHOW HOSTS [GRAPH | STORAGE | META];

Note

  • If you return SHOW HOSTS without the service name, it will show the host information of the Storage Service, as well as the leader number, leader distribution, and partition distribution.
  • 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       |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+
| "storaged0" | 9779  | "ONLINE" | 8            | "docs:5, basketballplayer:3"     | "docs:5, basketballplayer:3" |
| "storaged1" | 9779  | "ONLINE" | 9            | "basketballplayer:4, docs:5"     | "docs:5, basketballplayer:4" |
| "storaged2" | 9779  | "ONLINE" | 8            | "basketballplayer:3, docs:5"     | "docs:5, basketballplayer:3" |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+

nebula> SHOW HOSTS GRAPH;
+-----------+------+----------+---------+---------------+--------+
| Host      | Port | Status   | Role    | Git Info Sha | Version |
+-----------+------+----------+---------+--------------+---------+
| "graphd"  | 9669 | "ONLINE" | "GRAPH" | "3ba41bd"    | "2.6.0" |
| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd"    | "2.6.0" |
| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd"    | "2.6.0" |
+-----------+------+----------+---------+--------------+---------+

nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+---------+
| Host        | Port | Status   | Role      | Git Info Sha | Version |
+-------------+------+----------+-----------+--------------+---------+
| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd"    | "2.6.0" |
| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd"    | "2.6.0" |
| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd"    | "2.6.0" |
+-------------+------+----------+-----------+--------------+---------+

nebula> SHOW HOSTS META;
+----------+------+----------+--------+--------------+---------+
| Host     | Port | Status   | Role   | Git Info Sha | Version |
+----------+------+----------+--------+--------------+---------+
| "metad2" | 9559 | "ONLINE" | "META" | "3ba41bd"    | "2.6.0" |
| "metad0" | 9559 | "ONLINE" | "META" | "3ba41bd"    | "2.6.0" |
| "metad1" | 9559 | "ONLINE" | "META" | "3ba41bd"    | "2.6.0" |
+----------+------+----------+--------+--------------+---------+

Last update: March 13, 2023