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 | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port 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 zone type of the zone where the unit resides. Valid values include:
NoteThis field was introduced in V4.2.0. |
| REGION | varchar(128) | NO | The name of the region to which the zone where the unit resides belongs. The default value is default_region. Valid values include NULL: indicates that this value is invalid. This value may appear for a short period of time after an OBServer node restarts.
NoteThis field was introduced in 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 memory size 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. |
| MAX_NET_BANDWIDTH | bigint(20) | YES | The maximum network bandwidth of the unit in bytes.
NoteThis field was introduced in V4.3.4. |
| NET_BANDWIDTH_WEIGHT | bigint(20) | YES | The network bandwidth weight of the unit.
NoteThis field was introduced in V4.3.4. |
| 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 used in bytes. |
| DATA_DISK_SIZE | bigint(20) | YES |
NoteThis field was introduced in V4.3.4. |
| DATA_DISK_IN_USE | bigint(20) | NO |
|
| STATUS | varchar(64) | NO | The status of the unit. NORMAL: normalMIGRATING IN: being migrated inMIGRATING OUT: being migrated outMARK DELETING: marked for deletionWAIT GC: waiting for GC dataDELETING: data has been GC'd and is being deletedERROR: error |
| CREATE_TIME | timestamp(6) | NO | The creation time of the unit on the OBServer node. |
Sample query
The following example shows how to query the unit information of all user tenants on all OBServer nodes in SN mode.
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: 1
TENANT_ID: 1
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MAX_CPU: 4
MIN_CPU: 4
MEMORY_SIZE: 5368709120
MAX_IOPS: 9223372036854775807
MIN_IOPS: 9223372036854775807
IOPS_WEIGHT: 4
MAX_NET_BANDWIDTH: 9223372036854775807
NET_BANDWIDTH_WEIGHT: 4
LOG_DISK_SIZE: 9663676416
LOG_DISK_IN_USE: 2964278798
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 97017856
STATUS: NORMAL
CREATE_TIME: 2024-10-30 10:57:36.445269
*************************** 2. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
UNIT_ID: 1001
TENANT_ID: 1001
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MAX_CPU: NULL
MIN_CPU: NULL
MEMORY_SIZE: 1073741824
MAX_IOPS: NULL
MIN_IOPS: NULL
IOPS_WEIGHT: NULL
MAX_NET_BANDWIDTH: NULL
NET_BANDWIDTH_WEIGHT: NULL
LOG_DISK_SIZE: 1932735283
LOG_DISK_IN_USE: 1480671367
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 72187904
STATUS: NORMAL
CREATE_TIME: 2024-10-30 10:59:25.305248
*************************** 3. 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: 1731127928
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 26578944
STATUS: NORMAL
CREATE_TIME: 2024-10-30 10:59:25.305248
*************************** 4. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
UNIT_ID: 1002
TENANT_ID: 1003
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MAX_CPU: NULL
MIN_CPU: NULL
MEMORY_SIZE: 1073741824
MAX_IOPS: NULL
MIN_IOPS: NULL
IOPS_WEIGHT: NULL
MAX_NET_BANDWIDTH: NULL
NET_BANDWIDTH_WEIGHT: NULL
LOG_DISK_SIZE: 1932735283
LOG_DISK_IN_USE: 1482198905
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 70107136
STATUS: NORMAL
CREATE_TIME: 2024-10-30 11:00:07.614632
*************************** 5. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
UNIT_ID: 1002
TENANT_ID: 1004
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: 1749092883
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 29081600
STATUS: NORMAL
CREATE_TIME: 2024-10-30 11:00:07.614632
5 rows in set