Note
This view was introduced in OceanBase Database V4.0.0.
Purpose
The V$OB_UNITS view displays the information about the units on the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| 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 in OceanBase Database V4.2.0 and later. |
| REGION | varchar(128) | NO | The name of the region where the zone of the unit resides. If no region is specified, this column shows default_region by default. The value NULL indicates that the value of this column is invalid. The column value is invalid when the OBServer node is restarted.
NoteThis column is available in OceanBase Database V4.2.0 and later. |
| MAX_CPU | double | NO | The maximum number of CPU cores. |
| MIN_CPU | double | NO | The minimum number of CPU cores. |
| MEMORY_SIZE | bigint(20) | NO | The memory size, in bytes. |
| MAX_IOPS | bigint(20) | NO | The maximum disk IOPS. |
| MIN_IOPS | bigint(20) | NO | The minimum disk IOPS. |
| IOPS_WEIGHT | bigint(20) | NO | The IOPS weight. |
| LOG_DISK_SIZE | bigint(20) | NO | The size of the log disk. |
| LOG_DISK_IN_USE | bigint(20) | NO | The size of used space of the log disk. |
| DATA_DISK_IN_USE | bigint(20) | NO | The size of used space of the data disk. |
| STATUS | varchar(64) | NO | The status of the unit. Valid values:NORMAL: The unit is normal.MIGRATING IN: Data is being migrated into the unit.MIGRATING OUT: Data is being migrated out of the unit.MARK DELETING: The unit is marked as deleted.WAIT GC: The unit is waiting for garbage collection (GC).DELETING: GC has been completed, and the unit is being deleted.ERROR: An error occurred. |
| CREATE_TIME | timestamp(6) | NO | The time when the unit was created on the OBServer node. |
Sample query
Query the information about the units on the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_UNITS\G
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xx.xx
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
LOG_DISK_SIZE: 17394617549
LOG_DISK_IN_USE: 376532080
DATA_DISK_IN_USE: 16777216
STATUS: NORMAL
CREATE_TIME: 2024-07-31 14:49:09.020291
1 row in set