Note
This view is available starting with V4.0.0.
Purpose
This view displays the unit information of the OBServer node where the tenant is located. The system tenant can view the unit information of all OBServer nodes in the cluster.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| UNIT_ID | bigint(20) | NO | The ID of the unit. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the unit belongs. |
| ZONE | varchar(128) | NO | The name of the zone. |
| ZONE_TYPE | varchar(128) | NO | The type of the zone where the unit is located. Valid values:
NoteThis column is available starting with V4.2.0. |
| REGION | varchar(128) | NO | The name of the region to which the zone where the unit is located belongs. If this column is not set, the default value is default_region. If the value is NULL, this value is invalid. This value is temporarily displayed when the OBServer node restarts.
NoteThis column is available starting with V4.2.0. |
| MAX_CPU | double | NO | The upper limit of the CPU specification. |
| MIN_CPU | double | NO | The lower limit of the CPU specification. |
| MEMORY_SIZE | bigint(20) | NO | The size of memory, in bytes. |
| MAX_IOPS | bigint(20) | NO | The upper limit of the disk IOPS specification. |
| MIN_IOPS | bigint(20) | NO | The lower limit of the disk IOPS specification. |
| IOPS_WEIGHT | bigint(20) | NO | The IOPS weight. |
| LOG_DISK_SIZE | bigint(20) | NO | The size of the log disk, in bytes. |
| LOG_DISK_IN_USE | bigint(20) | NO | The size of the log disk that has been used, in bytes. |
| DATA_DISK_IN_USE | bigint(20) | NO | The size of the data disk that has been used, in bytes. |
| STATUS | varchar(64) | NO | The status of the unit. Valid values: NORMAL: Normal.MIGRATING IN: Migrating in.MIGRATING OUT: Migrating out.MARK DELETING: Marked for deletion.WAIT GC: Waiting for garbage collection.DELETING: Deleted after garbage collection.ERROR: Error. |
| CREATE_TIME | timestamp(6) | NO | The time when the unit is created on the OBServer node. |
Sample query
Query the unit information of all OBServer nodes where the tenant is located.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_UNITS\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xx.xx
SVR_PORT: 2882
UNIT_ID: 1001
TENANT_ID: 1002
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MAX_CPU: 2
MIN_CPU: 2
MEMORY_SIZE: 5368709120
MAX_IOPS: 9223372036854775807
MIN_IOPS: 9223372036854775807
IOPS_WEIGHT: 2
LOG_DISK_SIZE: 17394617549
LOG_DISK_IN_USE: 376413637
DATA_DISK_IN_USE: 16777216
STATUS: NORMAL
CREATE_TIME: 2024-07-31 14:49:09.020291
1 row in set