SHOW HOSTS¶
SHOW HOSTS
语句可以显示集群信息,包括端口、状态、leader、分片、版本等信息,或者指定显示 Graph、Storage、Meta 服务主机信息。
语法¶
SHOW HOSTS [GRAPH | STORAGE | META];
Note
对于使用源码安装的 NebulaGraph,执行添加了服务名的命令后,输出的信息中不显示版本信息。
示例¶
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" | "3.4.3" |
| "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "3.4.3" |
| "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "3.4.3" |
+-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+
nebula> SHOW HOSTS GRAPH;
+-----------+------+----------+---------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+-----------+------+----------+---------+--------------+---------+
| "graphd" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "3.4.3" |
| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "3.4.3" |
| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "3ba41bd" | "3.4.3" |
+-----------+------+----------+---------+--------------+---------+
nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+-------------+------+----------+-----------+--------------+---------+
| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "3.4.3" |
| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "3.4.3" |
| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "3ba41bd" | "3.4.3" |
+-------------+------+----------+-----------+--------------+---------+
nebula> SHOW HOSTS META;
+----------+------+----------+--------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+----------+------+----------+--------+--------------+---------+
| "metad2" | 9559 | "ONLINE" | "META" | "3ba41bd" | "3.4.3" |
| "metad0" | 9559 | "ONLINE" | "META" | "3ba41bd" | "3.4.3" |
| "metad1" | 9559 | "ONLINE" | "META" | "3ba41bd" | "3.4.3" |
+----------+------+----------+--------+--------------+---------+
最后更新:
September 4, 2023