@@ -17,18 +17,21 @@ DESC TABLE CLUSTER_INFO;
17
17
The output is as follows:
18
18
19
19
``` sql
20
- + -- -----------+----------------------+------+------+---------+---------------+
21
- | Column | Type | Key | Null | Default | Semantic Type |
22
- + -- -----------+----------------------+------+------+---------+---------------+
23
- | peer_id | Int64 | | NO | | FIELD |
24
- | peer_type | String | | NO | | FIELD |
25
- | peer_addr | String | | YES | | FIELD |
26
- | version | String | | NO | | FIELD |
27
- | git_commit | String | | NO | | FIELD |
28
- | start_time | TimestampMillisecond | | YES | | FIELD |
29
- | uptime | String | | YES | | FIELD |
30
- | active_time | String | | YES | | FIELD |
31
- + -- -----------+----------------------+------+------+---------+---------------+
20
+ + -- ------------+----------------------+------+------+---------+---------------+
21
+ | Column | Type | Key | Null | Default | Semantic Type |
22
+ + -- ------------+----------------------+------+------+---------+---------------+
23
+ | peer_id | Int64 | | NO | | FIELD |
24
+ | peer_type | String | | NO | | FIELD |
25
+ | peer_addr | String | | YES | | FIELD |
26
+ | cpus | UInt32 | | NO | | FIELD |
27
+ | memory_bytes | UInt64 | | NO | | FIELD |
28
+ | version | String | | NO | | FIELD |
29
+ | git_commit | String | | NO | | FIELD |
30
+ | start_time | TimestampMillisecond | | YES | | FIELD |
31
+ | uptime | String | | YES | | FIELD |
32
+ | active_time | String | | YES | | FIELD |
33
+ | node_status | String | | YES | | FIELD |
34
+ + -- ------------+----------------------+------+------+---------+---------------+
32
35
```
33
36
34
37
@@ -37,11 +40,14 @@ The columns in table:
37
40
* ` peer_id ` : the server id of the node. It's always ` 0 ` for standalone mode and ` -1 ` for frontends because it doesn't make sense in such cases.
38
41
* ` peer_type ` : the node type, ` METASRV ` ,` FRONTEND ` , or ` DATANODE ` for distributed clusters and ` STANDALONE ` for standalone deployments.
39
42
* ` peer_addr ` : the GRPC server address of the node. It's always empty for standalone deployments.
43
+ * ` cpus ` : the number of CPUs of the node.
44
+ * ` memory_bytes ` : the memory size of the node.
40
45
* ` version ` : The build version of the node, such as ` 0.7.2 ` etc.
41
46
* ` git_commit ` : The build git commit of the node.
42
47
* ` start_time ` : The node start time.
43
48
* ` uptime ` : The uptime of the node, in the format of duration string ` 24h 10m 59s 150ms ` .
44
49
* ` active_time ` : The duration string in the format of ` 24h 10m 59s 150ms ` since the node's last active time(sending the heartbeats), it's always empty for standalone deployments.
50
+ * ` node_status ` : the status info of the peer.
45
51
46
52
Query the table:
47
53
@@ -52,25 +58,25 @@ SELECT * FROM CLUSTER_INFO;
52
58
An example output in standalone deployments:
53
59
54
60
``` sql
55
- + -- -------+------------+-----------+---------+------------+-------------------------+ --------+-------------+
56
- | peer_id | peer_type | peer_addr | version | git_commit | start_time | uptime | active_time |
57
- + -- -------+------------+-----------+---------+------------+-------------------------+ --------+-------------+
58
- | 0 | STANDALONE | | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :02 .074 | 18ms | |
59
- + -- -------+------------+-----------+---------+------------+-------------------------+ --------+-------------+
61
+ + -- -------+------------+-----------+------+ -------------- +---------+ ----------- +----------------------------+--------+----- --------+-------------+
62
+ | peer_id | peer_type | peer_addr | cpus | memory_bytes | version | git_commit| start_time | uptime | active_time | node_status |
63
+ + -- -------+------------+-----------+------+ -------------- +---------+ ----------- +----------------------------+--------+----- --------+-------------+
64
+ | 0 | STANDALONE | | 16 | 17179869184 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :02 .074 | 18ms | | NULL |
65
+ + -- -------+------------+-----------+------+ -------------- +---------+ ----------- +----------------------------+--------+----- --------+-------------+
60
66
```
61
67
62
68
Another example is from a distributed cluster that has three Datanodes, one Frontend, and one Metasrv.
63
69
64
70
``` sql
65
- + -- -------+-----------+----------------+---------+------------+-------------------------+----------+-------------+
66
- | peer_id | peer_type | peer_addr | version | git_commit | start_time | uptime | active_time |
67
- + -- -------+-----------+----------------+---------+------------+-------------------------+----------+-------------+
68
- | 1 | DATANODE | 127 .0 .0 .1 :4101 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :04 .791 | 4s 478ms | 1s 467ms |
69
- | 2 | DATANODE | 127 .0 .0 .1 :4102 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :06 .098 | 3s 171ms | 162ms |
70
- | 3 | DATANODE | 127 .0 .0 .1 :4103 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :07 .425 | 1s 844ms | 1s 839ms |
71
- | - 1 | FRONTEND | 127 .0 .0 .1 :4001 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :08 .815 | 454ms | 47ms |
72
- | 0 | METASRV | 127 .0 .0 .1 :3002 | unknown | unknown | | | |
73
- + -- -------+-----------+----------------+---------+------------+-------------------------+----------+-------------+
71
+ + -- -------+-----------+----------------+------+ -------------- +---------+ ----------- +---------------------------- +----------+-------------+------------------------------------------------------ -------------+
72
+ | peer_id | peer_type | peer_addr | cpus | memory_bytes | version | git_commit| start_time | uptime | active_time | node_status |
73
+ + -- -------+-----------+----------------+------+ -------------- +---------+ ----------- +---------------------------- +----------+-------------+------------------------------------------------------ -------------+
74
+ | 1 | DATANODE | 127 .0 .0 .1 :4101 | 16 | 17179869184 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :04 .791 | 4s 478ms | 1s 467ms | { " workloads " :[ " hybrid " ], " leader_regions " : 46 , " follower_regions " : 0 } |
75
+ | 2 | DATANODE | 127 .0 .0 .1 :4102 | 16 | 17179869184 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :06 .098 | 3s 171ms | 162ms | { " workloads " :[ " hybrid " ], " leader_regions " : 46 , " follower_regions " : 0 } |
76
+ | 3 | DATANODE | 127 .0 .0 .1 :4103 | 16 | 17179869184 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :07 .425 | 1s 844ms | 1s 839ms | { " workloads " :[ " hybrid " ], " leader_regions " : 46 , " follower_regions " : 0 } |
77
+ | - 1 | FRONTEND | 127 .0 .0 .1 :4001 | 16 | 17179869184 | 0 .7 .2 | 86ab3d9 | 2024 - 04 - 30T06:40 :08 .815 | 454ms | 47ms | NULL |
78
+ | 0 | METASRV | 127 .0 .0 .1 :3002 | 16 | 17179869184 | unknown | unknown | | | | { " is_leader " :true} |
79
+ + -- -------+-----------+----------------+------+ -------------- +---------+ ----------- +---------------------------- +----------+-------------+------------------------------------------------------ -------------+
74
80
```
75
81
76
82
0 commit comments