Note
This view is available starting with V4.0.0.
Purpose
This view displays the information of the units on the current OBServer node.
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 resides. 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 resides belongs. If this column is not set, the default value is default_region. If the value is NULL, it indicates that the value is invalid, which will be temporarily invalid during the restart of an OBServer node.
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 statusMIGRATING IN: migrating inMIGRATING OUT: migrating outMARK DELETING: marked for deletionWAIT GC: waiting for garbage collectionDELETING: being deleted after garbage collectionERROR: error status |
| CREATE_TIME | timestamp(6) | NO | The time when the unit was created on the OBServer node. |
Sample query
Query the information of the units on the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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: 376532080
DATA_DISK_IN_USE: 16777216
STATUS: NORMAL
CREATE_TIME: 2024-07-31 14:49:09.020291
1 row in set