测试环境:1-1-1 OceanBase 企业版3.2.4.4
租户环境资源分布情况
select t.tenant_id, t.tenant_name, t.zone_list, t.primary_zone, t.locality, u.resource_pool_name, u.zone, u.svr_ip
from gv$tenant t join gv$unit u on (t.tenant_id=u.tenant_id)
where t.tenant_id=effective_tenant_id()
order by t.tenant_id, u.zone, u.svr_ip;
查看集群详细信息
SELECT
zone,
concat(svr_ip, ':', svr_port) observer,
cpu_capacity,
cpu_total,
cpu_assigned,
cpu_assigned_percent,
mem_capacity,
mem_total,
mem_assigned,
mem_assigned_percent,
unit_Num,
round(`load`, 2) `load`,
round(cpu_weight, 2) cpu_weight,
round(memory_weight, 2) mem_weight,
leader_count
FROM __all_virtual_server_stat
ORDER BY zone,svr_ip;
查看租户的 Context 和 Modudle 内存
SELECT
tenant_id,
svr_ip,
ctx_id,
ctx