GBase 8a
运维管理
文章

资源管控相关命令

发表于2025-03-07 11:36:2442次浏览0个评论

开启资源管理:    
    "select * from gbase.resource_plan;
active resource plan plan1 on vc vc1;"
刷新资源池:    
    refresh user storage usage;
查询资源池是否开启:    
    select config_int_value from gbase.resource_config where vc_id = '';   为0则关闭
关闭资源管理:    
    deactive resource plan on vc jsbq;
查vc_id:    
    show vcs;
查用户对应池子    
    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';
查池子分配空间:    
    总空间: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';
查已使用磁盘空间(单位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';

评论

登录后才可以发表评论