首页 > 数据库 > > 数据库管理工具-gs_gucZenith
GaussDB 100提供了gs_gucZenith工具来帮助完成在Online状态下对CN和DN的内核参数设置。
gs_gucZenith -c CMD [-I INSTANCENAMES | --force] [--scope=pfile]配置用户白名单
gs_gucZenith -S "TYPE USER ADDRESS" [-I INSTANCENAMES | --force]删除用户白名单信息
gs_gucZenith -R "TYPE USER ADDRESS" [-I INSTANCENAMES | --force]显示帮助信息。
gs_gucZenith { -? | --help }显示版本号信息。
gs_gucZenith { -V | --version }参数说明
需要设置的参数(形式为:参数名=参数值,例如:"USE_LARGE_PAGES=TRUE")。
允许设置如下内核参数(各参数的详细信息请参见参数说明):
指定需要增加的用户白名单信息(格式:'TYPE USER ADDRESS'),例如,-S 'host * 10.xx.xx.1'。该设置立即生效。
指定需要删除的用户白名单信息(格式:'TYPE USER ADDRESS'),例如,-R 'host * 10.xx.xx.1'。该设置立即生效。

需要设置的实例的实例名,多个实例需要使用半角逗号(“,”)分隔。
不指定-I参数且存在非ONLINE的CN或DN实例时,跳过该实例。
设置内核参数的生效方式,不设置此参数则为默认生效。
取值范围:pfile(表示重启生效)。
显示帮助信息。
显示版本号信息。
[omm@plat1 script]\>gs_gucZenith -c "LOG_BUFFER_SIZE=16M" --scope=pfile
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start verifying the specifications of the kernel parameter value...
Successfully verified the specifications of the kernel parameter value.
Start setting kernel parameter.
------------------------------
Current value of DB1_1 is "4M"
Set kernel parameter successfully! Instance: DB1_1
------------------------------
Current value of DB1_2 is "4M"
Set kernel parameter successfully! Instance: DB1_2
------------------------------
Current value of DB2_3 is "4M"
Set kernel parameter successfully! Instance: DB2_3
------------------------------
Current value of DB2_4 is "4M"
Set kernel parameter successfully! Instance: DB2_4
------------------------------
Current value of cn_401 is "4M"
Set kernel parameter successfully! Instance: cn_401
------------------------------
Current value of cn_402 is "4M"
Set kernel parameter successfully! Instance: cn_402
------------------------------
Successfully set kernel parameter.
Please restart the cluster to make the new value take effect.
[omm@plat1 script]\>gs_gucZenith -c "USE_LARGE_PAGES=TRUE" -I DB1_2,cn_401
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start verifying the specifications of the kernel parameter value...
Successfully verified the specifications of the kernel parameter value.
Start setting kernel parameter.
------------------------------
Current value of DB1_2 is "TRUE"
Set kernel parameter successfully! Instance: DB1_2
------------------------------
Current value of cn_401 is "TRUE"
Set kernel parameter successfully! Instance: cn_401
------------------------------
Successfully set kernel parameter.
Please restart the cluster to make the new value take effect.
[@plat1 script]\>gs_gucZenith -S 'host * 10.0.0.1'
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start config user whitelist.
------------------------------
Set User whitelist successfully! Instance: cn_401
------------------------------
Set User whitelist successfully! Instance: cn_402
------------------------------
End config user whitelist.
[@plat1 script]\>gs_gucZenith -R 'host * 10.0.0.1'
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start config user whitelist.
------------------------------
Remove User whitelist successfully! Instance: cn_401
------------------------------
Remove User whitelist successfully! Instance: cn_402
------------------------------
End config user whitelist.
[@plat1 script]\>gs_gucZenith -R 'host * 10.0.0.22'
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start config user whitelist.
------------------------------
Warning: Entry 'host * 10.0.0.22' not found for instance cn_401. Skip to remove this config.
------------------------------
Warning: Entry 'host * 10.0.0.22' not found for instance cn_402. Skip to remove this config.
------------------------------
End config user whitelist.
[@plat1 script]\>gs_gucZenith -S 'host * 10.0.0.1'
Get cluster status.
Start getting healthy zenith instances.
Successfully got healthy zenith instances.
Start config user whitelist.
------------------------------
Set User whitelist successfully! Instance: cn_401
------------------------------
Set User whitelist successfully! Instance: cn_402
End config user whitelist.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3133661/ ,如需转载,请注明出处,否则将追究法律责任。