Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show hosts #641

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SHOW HOSTS

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

## 语法

Expand All @@ -10,6 +10,10 @@ SHOW HOSTS [GRAPH | STORAGE | META];

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

!!! note

release版本才会显示`Version`列内容,nightly版本的`Version`列内容为空。

## 示例

```ngql
Expand All @@ -26,21 +30,23 @@ nebula> SHOW HOSTS;
Got 3 rows (time spent 866/1411 us)

nebula> SHOW HOSTS GRAPH;
+-------------+------+----------+---------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-------------+------+----------+---------+--------------+
| "12.16.2.3" | 9669 | "ONLINE" | "GRAPH" | "761f22b" |
+---------------+------+----------+---------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+---------------+------+----------+---------+--------------+---------+
| "192.168.x.x" | 9669 | "ONLINE" | "GRAPH" | "3c65733" | |
+---------------+------+----------+---------+--------------+---------+

nebula> SHOW HOSTS STORAGE;
+-------------+------+----------+-----------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-------------+------+----------+-----------+--------------+
| "12.16.2.3" | 9779 | "ONLINE" | "STORAGE" | "761f22b" |
+---------------+------+----------+-----------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+---------------+------+----------+-----------+--------------+---------+
| "192.168.x.x" | 9779 | "ONLINE" | "STORAGE" | "68487497" | |
+---------------+------+----------+-----------+--------------+---------+

nebula> SHOW HOSTS META;
+-------------+------+----------+--------+--------------+
| Host | Port | Status | Role | Git Info Sha |
+-------------+------+----------+--------+--------------+
| "12.16.2.3" | 9559 | "ONLINE" | "META" | "761f22b" |

+---------------+------+----------+--------+--------------+---------+
| Host | Port | Status | Role | Git Info Sha | Version |
+---------------+------+----------+--------+--------------+---------+
| "192.168.x.x" | 9559 | "ONLINE" | "META" | "68487497" | |
+---------------+------+----------+--------+--------------+---------+
```