CLUSTER_SYSTEMINFO

You can use the CLUSTER_SYSTEMINFO kernel parameter table to query the kernel configuration information of the server where all instances of the cluster are located. Currently, you can query the information of the sysctl system.

CLUSTER_SYSTEMINFO - 图1

Note

This table is only applicable to TiDB Self-Hosted and not available on TiDB Cloud.

  1. USE information_schema;
  2. DESC cluster_systeminfo;
  1. +-------------+--------------+------+------+---------+-------+
  2. | Field | Type | Null | Key | Default | Extra |
  3. +-------------+--------------+------+------+---------+-------+
  4. | TYPE | varchar(64) | YES | | NULL | |
  5. | INSTANCE | varchar(64) | YES | | NULL | |
  6. | SYSTEM_TYPE | varchar(64) | YES | | NULL | |
  7. | SYSTEM_NAME | varchar(64) | YES | | NULL | |
  8. | NAME | varchar(256) | YES | | NULL | |
  9. | VALUE | varchar(128) | YES | | NULL | |
  10. +-------------+--------------+------+------+---------+-------+
  11. 6 rows in set (0.00 sec)

Field description:

  • TYPE: Corresponds to the TYPE field in the information_schema.cluster_info table. The optional values are tidb, pd, and tikv.
  • INSTANCE: Corresponds to the INSTANCE field in the information_schema.cluster_info cluster information table.
  • SYSTEM_TYPE: The system type. Currently, you can query the system system type.
  • SYSTEM_NAME: The system name. Currently, you can query the sysctl system name.
  • NAME: The configuration name corresponding to sysctl.
  • VALUE: The value of the configuration item corresponding to sysctl.

The following example shows how to query the kernel version of all servers in the cluster using the CLUSTER_SYSTEMINFO system information table.

  1. SELECT * FROM cluster_systeminfo WHERE name LIKE '%kernel.osrelease%'
  1. +------+-------------------+-------------+-------------+------------------+----------------------------+
  2. | TYPE | INSTANCE | SYSTEM_TYPE | SYSTEM_NAME | NAME | VALUE |
  3. +------+-------------------+-------------+-------------+------------------+----------------------------+
  4. | tidb | 172.16.5.40:4008 | system | sysctl | kernel.osrelease | 3.10.0-862.14.4.el7.x86_64 |
  5. | pd | 172.16.5.40:20379 | system | sysctl | kernel.osrelease | 3.10.0-862.14.4.el7.x86_64 |
  6. | tikv | 172.16.5.40:21150 | system | sysctl | kernel.osrelease | 3.10.0-862.14.4.el7.x86_64 |
  7. +------+-------------------+-------------+-------------+------------------+----------------------------+