OceanBase Database allows you to check resource allocation of tenants in a view.
Procedure
Log on to the
systenant of the cluster as therootuser.Execute the following statement to go to the database named
oceanbase:obclient>USE oceanbase;Execute the following statement to query the resource allocation of all OBServer nodes in the cluster:
obclient> SELECT * FROM oceanbase.GV$OB_SERVERS\G *************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 ZONE: zone1 SQL_PORT: 2881 CPU_CAPACITY: 62 CPU_CAPACITY_MAX: 62 CPU_ASSIGNED: 4.5 CPU_ASSIGNED_MAX: 4.5 MEM_CAPACITY: 75161927680 MEM_ASSIGNED: 30064771072 LOG_DISK_CAPACITY: 179583320064 LOG_DISK_ASSIGNED: 55834574848 LOG_DISK_IN_USE: 9395240960 DATA_DISK_CAPACITY: 107374182400 DATA_DISK_IN_USE: 4724883456 DATA_DISK_HEALTH_STATUS: NORMAL DATA_DISK_ABNORMAL_TIME: NULL *************************** 2. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 ZONE: zone2 SQL_PORT: 2881 CPU_CAPACITY: 62 CPU_CAPACITY_MAX: 62 CPU_ASSIGNED: 4.5 CPU_ASSIGNED_MAX: 4.5 MEM_CAPACITY: 75161927680 MEM_ASSIGNED: 30064771072 LOG_DISK_CAPACITY: 179583320064 LOG_DISK_ASSIGNED: 55834574848 LOG_DISK_IN_USE: 9395240960 DATA_DISK_CAPACITY: 107374182400 DATA_DISK_IN_USE: 4724883456 DATA_DISK_HEALTH_STATUS: NORMAL DATA_DISK_ABNORMAL_TIME: NULL *************************** 3. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 ZONE: zone3 SQL_PORT: 2881 CPU_CAPACITY: 62 CPU_CAPACITY_MAX: 62 CPU_ASSIGNED: 4.5 CPU_ASSIGNED_MAX: 4.5 MEM_CAPACITY: 75161927680 M EM_ASSIGNED: 30064771072 LOG_DISK_CAPACITY: 179583320064 LOG_DISK_ASSIGNED: 55834574848 LOG_DISK_IN_USE: 9395240960 DATA_DISK_CAPACITY: 107374182400 DATA_DISK_IN_USE: 4724883456 DATA_DISK_HEALTH_STATUS: NORMAL DATA_DISK_ABNORMAL_TIME: NULL 3 row in setFor more information about the
oceanbase.GV$OB_SERVERSview, see GV$OB_SERVERS.Execute the following statement to query the resource allocation of all tenants in the cluster:
obclient> SELECT * FROM oceanbase.GV$OB_UNITS\G *************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1 T ENANT_ID: 1 ZONE: zone1 MAX_CPU: 2.5 MIN_CPU: 2.5 MEMORY_SIZE: 17179869184 MAX_IOPS: 25000 MIN_IOPS: 25000 IOPS_WEIGHT: 2 LOG_DISK_SIZE: 17179869184 LOG_DISK_IN_USE: 191441460 DATA_DISK_IN_USE: 406847488 STATUS: NORMAL CREATE_TIME: 2022-07-19 11:04:39.226231 *************************** 2. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1001 TENANT_ID: 1001 ZONE: zone1 MAX_CPU: NULL MIN_CPU: NULL MEMORY_SIZE: 644245094 MAX_IOPS: NULL MIN_IOPS: NULL IOPS_WEIGHT: NULL LOG_DISK_SIZE: 1932735283 LOG_DISK_IN_USE: 155042605 DATA_DISK_IN_USE: 211812352 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:48:36.308843 *************************** 3. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1001 TENANT_ID: 1002 ZONE: zone1 MAX_CPU: 1 MIN_CPU: 1 MEMORY_SIZE: 5798205850 MAX_IOPS: 10000 MIN_IOPS: 10000 IOPS_WEIGHT: 1 LOG_DISK_SIZE: 17394617549 LOG_DISK_IN_USE: 154632504 DATA_DISK_IN_USE: 121634816 STATUS: NORMAL C REATE_TIME: 2022-07-19 13:48:36.308843 *************************** 4. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1002 TENANT_ID: 1005 ZONE: zone1 MAX_CPU: NULL MIN_CPU: NULL MEMORY_SIZE: 644245094 MAX_IOPS: NULL MIN_IOPS: NULL I OPS_WEIGHT: NULL LOG_DISK_SIZE: 1932735283 LOG_DISK_IN_USE: 152132563 DATA_DISK_IN_USE: 211812352 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:51:56.627867 *************************** 5. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1002 TENANT_ID: 1006 ZONE: zone1 MAX_CPU: 1 MIN_CPU: 1 MEMORY_SIZE: 5798205850 MAX_IOPS: 10000 MIN_IOPS: 10000 IOPS_WEIGHT: 1 LOG_DISK_SIZE: 17394617549 LOG_DISK_IN_USE: 158023991 DATA_DISK_IN_USE: 134217728 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:51:56.627867 5 rows in setFor more information about the
oceanbase.GV$OB_UNITSview, see GV$OB_UNITS.