gbase8a资源管控常用命令
1、开启资源管理:
"select * from gbase.resource_plan;
active resource plan plan1 on vc vc1;"
2、刷新资源池:
refresh user storage usage;
3、查询资源池是否开启:
select config_int_value from gbase.resource_config where vc_id = ''; 为0则关闭
4、关闭资源管理:
deactive resource plan on vc jsbq;
5、查vc_id:
show vcs;
6、查用户对应池子
select a.resource_pool_name,b.resource_plan_directive_name,b.consumer_group_id,c.user_name from gbase.resource_pool a left join gbase.resource_plan_directive b on a.resource_pool_id=b.resource_pool_id left join gbase.consumer_group_user c on b.consumer_group_id=c.consumer_group_id where a.vc_id='vc_id' and c.user_name='user_name';
7、查池子分配空间:
总空间:select max_disk_space*60/1024/1024/1024/1024 from gbase.resource_pool where resource_pool_name='池子_id';
单节点:select max_disk_space/1024/1024/1024/1024 from gbase.resource_pool where resource_pool_name='池子_id';
8、查已使用磁盘空间(单位T):
总空间:select sum(DISK_USAGE)/1024/1024/1024/1024 from information_schema.GNODES_resource_pool_USAGE where resource_pool_NAME='池子_id';
各节点:select DISK_USAGE/1024/1024/1024/1024 from information_schema.GNODES_resource_pool_USAGE where resource_pool_NAME='池子_id';
最大节点:select max(DISK_USAGE/1024/1024/1024/1024) from information_schema.GNODES_resource_pool_USAGE where resource_pool_NAME='池子_id';
热门帖子
- 12025-12-01浏览数:182763
- 22023-05-09浏览数:25057
- 42023-09-25浏览数:18525
- 52020-05-11浏览数:17528