GBase 8a
运维管理
文章

gbase8a资源管控常用命令

发表于2025-03-14 15:10:1395次浏览2个评论

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';

评论

登录后才可以发表评论
崔哥发表于 5个月前
兔园标物序,惊时最是梅。衔霜当路发,映雪拟寒开。枝横却月观,花绕凌风台。朝洒长门泣,夕驻临邛杯。应知早飘落,故逐上春来。
沉香发表于 2个月前
三人行必有我师