title | summary | aliases | |||
---|---|---|---|---|---|
CLUSTER_INFO |
Learn the `CLUSTER_INFO` cluster topology information table. |
|
The CLUSTER_INFO
cluster topology table provides the current topology information of the cluster, the version information of each instance, the Git Hash corresponding to the instance version, the starting time of each instance, and the running time of each instance.
{{< copyable "sql" >}}
USE information_schema;
desc cluster_info;
+----------------+-------------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------+------+------+---------+-------+
| TYPE | varchar(64) | YES | | NULL | |
| INSTANCE | varchar(64) | YES | | NULL | |
| STATUS_ADDRESS | varchar(64) | YES | | NULL | |
| VERSION | varchar(64) | YES | | NULL | |
| GIT_HASH | varchar(64) | YES | | NULL | |
| START_TIME | varchar(32) | YES | | NULL | |
| UPTIME | varchar(32) | YES | | NULL | |
+----------------+-------------+------+------+---------+-------+
7 rows in set (0.00 sec)
Field description:
TYPE
: The instance type. The optional values aretidb
,pd
, andtikv
.INSTANCE
: The instance address, which is a string in the format ofIP:PORT
.STATUS_ADDRESS
: The service address of HTTP API. Some commands in tikv-ctl, pd-ctl, or tidb-ctl might use this API and this address. You can also get more cluster information via this address. Refer to TiDB HTTP API document for details.VERSION
: The semantic version number of the corresponding instance. To be compatible with the MySQL version number, the TiDB version is displayed in the format of${mysql-version}-${tidb-version}
.GIT_HASH
: The Git Commit Hash when compiling the instance version, which is used to identify whether two instances are of the absolutely consistent version.START_TIME
: The starting time of the corresponding instance.UPTIME
: The uptime of the corresponding instance.
{{< copyable "sql" >}}
SELECT * FROM cluster_info;
+------+-----------------+-----------------+--------------+------------------------------------------+---------------------------+---------------------+
| TYPE | INSTANCE | STATUS_ADDRESS | VERSION | GIT_HASH | START_TIME | UPTIME |
+------+-----------------+-----------------+--------------+------------------------------------------+---------------------------+---------------------+
| tidb | 0.0.0.0:4000 | 0.0.0.0:10080 | 4.0.0-beta.2 | 0df3b74f55f8f8fbde39bbd5d471783f49dc10f7 | 2020-07-05T09:25:53-06:00 | 26h39m4.352862693s |
| pd | 127.0.0.1:2379 | 127.0.0.1:2379 | 4.1.0-alpha | 1ad59bcbf36d87082c79a1fffa3b0895234ac862 | 2020-07-05T09:25:47-06:00 | 26h39m10.352868103s |
| tikv | 127.0.0.1:20165 | 127.0.0.1:20180 | 4.1.0-alpha | b45e052df8fb5d66aa8b3a77b5c992ddbfbb79df | 2020-07-05T09:25:50-06:00 | 26h39m7.352869963s |
+------+-----------------+-----------------+--------------+------------------------------------------+---------------------------+---------------------+
3 rows in set (0.00 sec)