使用gadmin工具管理

简介

TigerGraph图管理工具(即gadmin)是一个用于管理TigerGraph服务器的工具。它包含了一个帮助说明和一个man页面,具体的输出信息如下所示。

以下命令的任何一条都可以列出gadmin工具的所有可用选项和命令格式:

$ gadmin -h
$ man gadmin
$ info gadmin

在更改了某些配置设置后,用户最好可以使用gadmin config-apply的命令激活该配置。某些命令可能已经自动隐含了config-apply的动作,如果你不清楚某条命令是否包含该隐藏动作,可直接运行config-apply。

命令列表

下面是gadmin的man页面具体内容。绝大多数命令都很容易通过字面意思理解。

GADMIN(1)                                                                       User Commands                                                                       GADMIN(1)

NAME
       gadmin - manual page for TigerGraph Administrator.

SYNOPSIS
       gadmin [options] COMMAND [parameters]

DESCRIPTION
       Version 1.0, Sept, 19, 2017

       gadmin is a tool for managing TigerGraph servers

OPTIONS
       -h, --help
              show this help message and exit

       --configure
              invoke  interactive (re)configuration tool. Options: single_dir:/xxx/yyy(deploy directory will be /xxx/yyy), or a keyword(e.g., 'gadmin --configure port', will
              configure any entry whose name has string 'port')

       --set  set one configuration

       --dump-config
              dump current configuration after parsing config files and command line options and exit

       --dry-run
              show what operation will be performed but don't actually do it

       -p SSH_PASSWORD, --password=SSH_PASSWORD
              the password to ssh to other nodes

       -y, --yes
              silently answer Yes to all prompts

       -v, --verbose
              enable verbose output

       --version
              show gadmin version and exit

       -f, --force
              execute without performing checks

       --wait wait for the last command to finish (e.g., snapshot)

   Commands:
       Server status
              gadmin status [gpe gse restpp dict,...]

       IUM status
              gadmin ium_status

       Disk space of devices
              gadmin ds [path]

       Mount info of a path
              gadmin mount {path}

       Memory usage of TigerGraph components
              gadmin mem [gse gpe restpp dict,...]

       CPU usage of TigerGraph components
              gadmin cpu [gse gpe restpp dict,...]

       Check TigerGraph system prerequisites and resources
              gadmin check

       Show log of gpe, gse, restpp and issued fab commands
              gadmin log [gse gpe restpp dict fab,...]

       Get various information about gpe, gse and restpp
              gadmin info [gse gpe restpp dict,...]

       Software version(s) of TigerGraph components
              gadmin version [gse gpe restpp dict,...]

       Stop specified or all services
              gadmin stop [gse gpe restpp dict,...]

       Restart specified or all services
              gadmin restart [gse gpe restpp dict,...]

       Start specified or all services
              gadmin start [gse gpe restpp dict,...]

       Start the RESTPP loaders
              gadmin start_restpp_loaders

       Start the KAFKA loaders
              gadmin start_kafka_loaders

       Stop the RESTPP loaders
              gadmin stop_restpp_loaders

       Stop the KAFKA loaders
              gadmin stop_kafka_loaders

       Dump partial or full graph to a directory
              gadmin dump_graph {gse, gpe [*, segment], all}, dir, separator

       Snapshot gpe and gse
              gadmin snapshot

       Reset the kafka queues
              gadmin reset

       Show the available packages
              gadmin pkg-info

       Install new package to TigerGraph system
              gadmin pkg-install

       Update gpe, gse, restpp, dict, etc. without configuration change
              gadmin pkg-update

       Remove available packages or binaries from package pool
              gadmin pkg-rm [files]

       Apply new configure. Note some modules may need to restart
              gadmin config-apply [gse gpe restpp dict kafka zk]

       Set a new license key
              gadmin set-license-key license key string

       Update the new graph schema
              gadmin update_graph_config

       Update components under a directory
              gadmin update

       Setup sync of all gstore data in mutiple machines
              gadmin setup_gstore_sync

       Setup rate control of RESTPP loader
              gadmin setup_restpploader_rate_ctl

       Restart sync of all gstore data in mutiple machines
              gadmin gstore_sync_restart

       Stop sync of all gstore data in mutiple machines
              gadmin gstore_sync_stop

       For more information, updates and news, visit gadmin website: http://www.tigergraph.com

SEE ALSO
       The full documentation for gadmin is maintained as a Texinfo manual.  If the info and gadmin programs are properly installed at your site, the command

              info gadmin

       should give you access to the complete manual.

TigerGraph Administrator.                                                         Sept 2017                                                                         GADMIN(1)

示例

例:检查TigerGraph组件服务器的状态:

执行"gadmin status"命令可以得到一份状态报告,列出了所有主要组件的服务器是否处于运行(running \ up)或停止(stopped \ off)状态

$ gadmin status

=== zk === 
[SUMMARY][ZK] process is up 
[SUMMARY][ZK] /home/tigergraph/tigergraph/zk is ready 
=== kafka === 
[SUMMARY][KAFKA] process is up 
[SUMMARY][KAFKA] queue is ready 
=== gse === 
[SUMMARY][GSE] process is down 
[SUMMARY][GSE] id service has NOT been initialized 
=== dict === 
[SUMMARY][DICT] process is up 
[SUMMARY][DICT] dict server is ready 
=== graph === 
[SUMMARY][GRAPH] graph has NOT been initialized 
=== restpp === 
[SUMMARY][RESTPP] process is down 
[SUMMARY][RESTPP] restpp has NOT been initialized 
=== gpe === 
[SUMMARY][GPE] process is down 
[SUMMARY][GPE] graph has NOT been initialized 
=== glive === 
[SUMMARY][GLIVE] process is up 
[SUMMARY][GLIVE] glive is ready 
=== Visualization === 
[SUMMARY][VIS] process is up (WebServer:2254; DataBase:2255) 
[SUMMARY][VIS] Web server is working

例:停止一台特定的服务器,例如一台rest服务器 (机器名为“restpp"):

$ gadmin stop restpp

例:将队列的保留空间修改为10GB:

$ gadmin --set -f online.queue.retention_size 10

更新TigerGraph许可证秘钥

TigerGraph许可证秘钥通常在安装系统是导入,若用户获得了新的秘钥,请执行下面的命令安装新的秘钥:

gadmin set-license-key <new_key>

接下来执行:

gadmin config-apply
例: 导入许可证秘钥
$ gadmin set-license-key new_license_key 

[RUN ] /home/tigergraph/.gsql/gpe_auto_start_add2cron.sh 
[RUN ] /home/tigergraph/.gsql/all_log_cleanup_add2cron.sh 
[RUN ] rm -rf /home/tigergraph/tigergraph_coredump 
[RUN ] mkdir -p /home/tigergraph/tigergraph/logs/coredump 
[RUN ] ln -s /home/tigergraph/tigergraph/logs/coredump /home/tigergraph/tigergraph_coredump 

$ gadmin config-apply 
[FAB ][2017-03-31 15:03:05] check_config 
[FAB ][2017-03-31 15:03:06] update_config_all 
Local config modification Found, will restart dict server and update configures. 
[FAB ][2017-03-31 15:03:11] launch_zookeepers 
[FAB ][2017-03-31 15:03:21] launch_gsql_subsystems:DICT 
[FAB ][2017-03-31 15:03:22] gsql_mon_alert_on 
Local config modification sync to dictionary successfully!

$

Last updated