Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays the information about the units on this OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Server IP address |
| SVR_PORT | bigint(20) | NO | Server port |
| 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 is located. Valid values include:
NoteIntroduced in V4.2.0. |
| REGION | varchar(128) | NO | Name of the region where the zone where the unit is located belongs to. The default value is default_region. Valid values include NULL: indicates that the value of this column is invalid. This value may appear for a short period of time after an OBServer node restarts.
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 | Weight of the network bandwidth of the unit
NoteThis view was introduced in OceanBase Database V4.3.4. |
| LOG_DISK_SIZE | bigint(20) | NO | Log disk size in bytes |
| LOG_DISK_IN_USE | bigint(20) | NO | Log disk usage 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 NORMAL: normalMIGRATING IN: migrating inMIGRATING OUT: migrating outMARK DELETING: marked for deletionWAIT GC: waiting for GC dataDELETING: data has been GC'd, and the unit is being deletedERROR: error |
| CREATE_TIME | timestamp(6) | NO | Creation time of the unit on the OBServer node |
Sample query
The following example shows how to query the information about the units on this OBServer node in SN mode.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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: 1732226432
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 26578944
STATUS: NORMAL
CREATE_TIME: 2024-10-30 10:59:25.305248
1 row in set