跳转至

SHOW HOSTS

SHOW HOSTS语句可以显示Graph、Storage、Meta服务主机信息、版本信息。

语法

SHOW HOSTS [GRAPH | STORAGE | META];

不添加服务名,直接使用SHOW HOSTS,会显示Storage服务主机信息,以及leader总数、leader分布和分片分布。

示例

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" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:20:18" |
+-----------+------+----------+---------+--------------+-------------------------------------------+
| "graphd1" | 9669 | "ONLINE" | "GRAPH" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:20:18" |
+-----------+------+----------+---------+--------------+-------------------------------------------+
| "graphd2" | 9669 | "ONLINE" | "GRAPH" | "c397299c"   | "2.5.0, Build Time: Aug 19 2021 11:20:18" |
+-----------+------+----------+---------+--------------+-------------------------------------------+

nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+-------------------------------------------+
| Host        | Port | Status   | Role      | Git Info Sha | Version                                   |
+-------------+------+----------+-----------+--------------+-------------------------------------------+
| "storaged0" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+-------------+------+----------+-----------+--------------+-------------------------------------------+
| "storaged1" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+-------------+------+----------+-----------+--------------+-------------------------------------------+
| "storaged2" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+-------------+------+----------+-----------+--------------+-------------------------------------------+

nebula> SHOW HOSTS META;
+----------+------+----------+--------+--------------+-------------------------------------------+
| Host     | Port | Status   | Role   | Git Info Sha | Version                                   |
+----------+------+----------+--------+--------------+-------------------------------------------+
| "metad2" | 9559 | "ONLINE" | "META" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+----------+------+----------+--------+--------------+-------------------------------------------+
| "metad0" | 9559 | "ONLINE" | "META" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+----------+------+----------+--------+--------------+-------------------------------------------+
| "metad1" | 9559 | "ONLINE" | "META" | "5b83e5cb"   | "2.5.0, Build Time: Aug 19 2021 10:30:28" |
+----------+------+----------+--------+--------------+-------------------------------------------+

最后更新: August 19, 2021
Back to top