Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays the Unit information of the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| UNIT_ID | NUMBER(38) | NO | The ID of the Unit. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant to which the Unit belongs. |
| ZONE | VARCHAR2(128) | NO | The name of the zone. |
| ZONE_TYPE | VARCHAR2(128) | NO | The zone type of the zone where the Unit is located. Valid values include:
NoteThis field was introduced in V4.2.0. |
| REGION | VARCHAR2(128) | NO | The name of the region to which the zone where the Unit is located belongs. The default value is default_region. The value NULL indicates that the value is invalid. This value can appear for a short period of time after an OBServer node is restarted.
NoteThis field was introduced in V4.2.0. |
| MIN_CPU | NUMBER(38) | NO | The minimum CPU specification. |
| MAX_CPU | NUMBER(38) | NO | The maximum CPU specification. |
| MEMORY_SIZE | NUMBER(38) | NO | The memory size in bytes. |
| MIN_IOPS | NUMBER(38) | NO | The minimum disk IOPS specification. |
| MAX_IOPS | NUMBER(38) | NO | The maximum disk IOPS specification. |
| IOPS_WEIGHT | NUMBER(38) | NO | The IOPS weight. |
| MAX_NET_BANDWIDTH | NUMBER(38) | YES | The maximum network bandwidth of the Unit in bytes.
NoteThis field was introduced in V4.3.4. |
| NET_BANDWIDTH_WEIGHT | NUMBER(38) | YES | The network bandwidth weight of the Unit.
NoteThis field was introduced in V4.3.4. |
| LOG_DISK_SIZE | NUMBER(38) | NO | The size of the log disk in bytes. |
| LOG_DISK_IN_USE | NUMBER(38) | NO | The size of the used log disk in bytes. |
| DATA_DISK_SIZE | NUMBER(38) | YES |
NoteThis field was introduced in V4.3.4. |
| DATA_DISK_IN_USE | NUMBER(38) | NO |
|
| STATUS | VARCHAR2(64) | NO | The status of the Unit. 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 | NUMBER(38) | NO | The time when the Unit was created on the OBServer node. |
Sample query
The following example shows how to query the Unit information of the current OBServer node in SN mode.
obclient [SYS]> SELECT * FROM SYS.V$OB_UNITS\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
UNIT_ID: 1002
TENANT_ID: 1004
ZONE: zone1
ZONE_TYPE: ReadWrite
REGION: default_region
MIN_CPU: 2
MAX_CPU: 2
MEMORY_SIZE: 5368709120
MIN_IOPS: 9223372036854775807
MAX_IOPS: 9223372036854775807
IOPS_WEIGHT: 2
MAX_NET_BANDWIDTH: 9223372036854775807
NET_BANDWIDTH_WEIGHT: 2
LOG_DISK_SIZE: 17394617549
LOG_DISK_IN_USE: 1751668778
DATA_DISK_SIZE: NULL
DATA_DISK_IN_USE: 29081600
STATUS: NORMAL
CREATE_TIME: 1730257207614632
1 row in set