Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays the Unit information of the OBServer node where the tenant resides. 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 | IP address of the server. |
| SVR_PORT | bigint(20) | NO | Port number of the server. |
| UNIT_ID | bigint(20) | NO | Unit ID. |
| TENANT_ID | bigint(20) | NO | ID of the tenant to which the Unit belongs. |
| ZONE | varchar(128) | NO | Zone name. |
| ZONE_TYPE | varchar(128) | NO | Zone type of the Zone where the Unit resides. Valid values include:
NoteIntroduced in V4.2.0. |
| REGION | varchar(128) | NO | Name of the region to which the Zone where the Unit resides belongs. The default value is default_region. Valid values include:
NoteIntroduced in V4.2.0. |
| MAX_CPU | double | NO | Upper limit of CPU specifications. |
| MIN_CPU | double | NO | Lower limit of CPU specifications. |
| MEMORY_SIZE | bigint(20) | NO | Memory size in bytes. |
| MAX_IOPS | bigint(20) | NO | Upper limit of disk IOPS specifications. |
| MIN_IOPS | bigint(20) | NO | Lower limit of disk IOPS specifications. |
| IOPS_WEIGHT | bigint(20) | NO | IOPS weight. |
| MAX_NET_BANDWIDTH | bigint(20) | YES | Maximum network bandwidth of the Unit in bytes.
NoteThis view was introduced in OceanBase Database V4.3.4. |
| NET_BANDWIDTH_WEIGHT | bigint(20) | YES | Network bandwidth weight of the Unit.
NoteThis view was introduced in OceanBase Database V4.3.4. |
| LOG_DISK_SIZE | bigint(20) | NO | Size of the log disk in bytes. |
| LOG_DISK_IN_USE | bigint(20) | NO | Size of the used log disk in bytes. |
| DATA_DISK_SIZE | bigint(20) | YES |
NoteThis view was introduced in OceanBase Database V4.3.4. |
| DATA_DISK_IN_USE | bigint(20) | NO |
|
| STATUS | varchar(64) | NO | Status of the Unit. Valid values include:NORMAL: normal statusMIGRATING IN: migrating inMIGRATING OUT: migrating outMARK DELETING: marked for deletionWAIT GC: waiting for GC dataDELETING: data has been GC'd, and is being deletedERROR: error status |
| CREATE_TIME | timestamp(6) | NO | Creation time of the Unit on the OBServer node. |
Sample query
In SN mode, query the Unit information of all OBServer nodes where the tenant resides.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_UNITS\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
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
MAX_NET_BANDWIDTH: 9223372036854775807
NET_BANDWIDTH_WEIGHT: 2
LOG_DISK_SIZE: 17394617549
LOG_DISK_IN_USE: 1732505049
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 26578944
STATUS: NORMAL
CREATE_TIME: 2024-10-30 10:59:25.305248
1 row in set