Note
This view is available starting with V4.0.0.
Purpose
This view displays the unit information of the OBServer node where the tenant resides. The sys 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 to which the unit belongs. Valid values:
NoteThis column is available starting with V4.2.0. |
| REGION | varchar(128) | NO | The name of the region to which the zone belongs. If this column is not set, the default value is default_region. If the value of this column is NULL, it indicates that the value is invalid. This value may appear temporarily after an OBServer node restarts.
NoteThis column is available starting with V4.2.0. |
| MAX_CPU | double | NO | The maximum CPU specification. |
| MIN_CPU | double | NO | The minimum CPU specification. |
| MEMORY_SIZE | bigint(20) | NO | The size of memory, in bytes. |
| MAX_IOPS | bigint(20) | NO | The maximum IOPS specification. |
| MIN_IOPS | bigint(20) | NO | The minimum 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 column is available starting with V4.3.4. |
| NET_BANDWIDTH_WEIGHT | bigint(20) | YES | The weight of the network bandwidth of the unit.
NoteThis column is available starting with 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 that has been used, in bytes. |
| DATA_DISK_SIZE | bigint(20) | YES |
NoteThis column is available starting with V4.3.4. |
| DATA_DISK_IN_USE | bigint(20) | NO |
|
| STATUS | varchar(64) | NO | The status of the unit. Valid values:
|
| CREATE_TIME | timestamp(6) | NO | The time when the unit was created on the OBServer node. |
| REPLICA_TYPE | varchar(7) | NO | The replica type. The default value is FULL
Note
|
Sample query
In SN mode, the sys tenant queries the unit information of all user tenants on all OBServer nodes.
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
REPLICA_TYPE: FULL
*************************** 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
REPLICA_TYPE: FULL
*************************** 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
REPLICA_TYPE: FULL
*************************** 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
REPLICA_TYPE: FULL
*************************** 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
REPLICA_TYPE: FULL
5 rows in set
References
Query the unit information on the current node: V$OB_UNITS
For more information about tenant resources, see View tenant and resource information.
