Managing with gadmin

Introduction

TigerGraph Graph Administrator (gadmin) is a tool for managing TigerGraph servers. It has a self-contained help function and a man page, whose output is shown below for reference.

To see a listing of all the options or commands available for gadmin, run any of the following commands:

$ gadmin -h
$ gadmin --help

After changing a configuration setting, it is generally necessary to run gadmin config apply. Some commands invoke config apply automatically. If you are not certain, just run
gadmin config apply

List of commands

Below is the man page for gadmin. Most of the commands are self-explanatory. Common examples are provided with each command.

Some commands have changed in v3.0. In particular,
gadmin set <config | license>
has changed to
gadmin <config | license> set

GADMIN(1)                         User Commands                                GADMIN(1)

NAME
       gadmin - manual page for TigerGraph Administrator.

SYNOPSIS
       gadmin [flags]
       gadmin [command]

DESCRIPTION
       gadmin is a tool for managing TigerGraph servers

OPTIONS
       Available Commands:
         autocomplete Generate autocomplete script
         config       Manage the configuration for the TigerGraph system
         help         Help about any command
         init         Init the whole cluster or given service
         license      Manage TigerGraph license
         log          List log files of the given services or all services
         reset        Reset the whole init or given service with its data
         restart      Restart services by service id
         start        Start services by service id
         status       Show current status of service
         stop         Stop services by service id
         version      Show the version information

Flags:
      --debug   enable debug log output to stdout
  -h, --help    help for gadmin

Use "gadmin [command] --help" for more information about a command.
GADMIN(1)

gadmin autocomplete

Gadmin autocomplete is more of a feature than a command. It is an auto-complete feature that allows you to see all possible entries of a specific configuration. You can press tab when typing a command to either print out all possible entries, or auto-complete the entry you are currently typing.

$ gadmin autocomplete -h

Generate autocomplete script

Usage:
  gadmin autocomplete <bash|zsh> [flags]

Description:
  If you want to make this automatic, add ". <(gadmin autocomplete bash)" to your
  .bashrc file.

Flags:
  -h, --help   help for autocomplete

Global Flags:
      --debug   enable debug log output to stdout

The example below shows an example of the autocomplete for the command gadmin status.

tigergraph@ubuntu:~$ gadmin status
admin         exe           ifm           nginx
all           gpe           infra         restpp
ctrl          gse           kafka         ts3
dict          gsql          kafkaconn     ts3serv
etcd          gui           kafkastrm-ll  zk

gadmin config

gadmin config commands are used to manage the configuration for the TigerGraph system. To get a complete list of configuration parameters that are available, see Configuration Parameters.

gadmin config has many sub-entries as well, they will be listed below.

$ gadmin config -h

Manage the configuration for the TigerGraph system

Usage:
  gadmin config [flags]
  gadmin config [command]

Description:
  You can specify local config file to turn on file mode, which no remote
  connection will be made and the configs are read/write from/to the file.Note: Not
  all config commands work on file mode.

Available Commands:
  apply       Apply the config changes in staging state
  diff        Show the differences between staging and applied configs
  discard     Discard the staging config changes
  dump        Dump the staging system config in json format
  entry       Configure the entries with given substring patterns interactively
  get         Get the config value of given entry name non-interactivly
  group       Configure the entries of given groups interactively
  init        Initialize configuration
  list        List the available config entries or groups
  set         Configure the entry of given config entry name in a non-interactive manner

Flags:
      --file string   specify config file path
  -h, --help          help for config

Global Flags:
      --debug   enable debug log output to stdout

Use "gadmin config [command] --help" for more information about a command.

Example: Change the retention size of the kafka queue to 10GB:

$ gadmin config set Kafka.RetentionSizeGB 10

gadmin config apply

$ gadmin config apply -h
Apply the config changes in staging state

Usage:
  gadmin config apply [flags]

Flags:
  -y, --confirm              confirm to apply
  -f, --force                force components to apply new config
  -h, --help                 help for apply
      --initial              config apply with the initial configuration when the remote config (ETCD) is empty
      --with-config string   the input config file used to config apply, will overwrite both local and remote(ETCD)

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config diff

Show what configuration changes were made.

$ gadmin config diff -h
Show the differences between staging and applied configs

Usage:
  gadmin config diff [flags]

Flags:
  -h, --help   help for diff

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config discard

Discard the configuration changes without applying them.

$ gadmin config discard -h
Discard the staging config changes

Usage:
  gadmin config discard [flags]

Flags:
  -h, --help   help for discard

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config dump

Display all configuration entries.

$ gadmin config dump -h
Dump the staging system config in json format

Usage:
  gadmin config dump [flags]

Flags:
  -h, --help   help for dump

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config entry

Change a configuration entry.

$ gadmin config entry -h
Configure the entries with given substring patterns interactively

Usage:
  gadmin config entry [EntryName] [flags]

Description:
  You may use `config entry system` to go through all the system related entries.

Flags:
  -a, --all     configure all entries
      --basic   configure basic entries only
  -h, --help    help for entry

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config get

Get the value of a specific configuration entry.

$ gadmin config get -h
Get the config value of given entry name non-interactivly

Usage:
  gadmin config get [EntryName] [flags]

Flags:
  -h, --help   help for get

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config group

Configure entries for a specific service group.
e.g. KAFKA, GPE, ZK

$ gadmin config group -h
Configure the entries of given groups interactively

Usage:
  gadmin config group [GroupName] [flags]

Description:
  You may use `gadmin config list group` to see all the groups.

Flags:
  -h, --help   help for group

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config init

Initialize your configuration.

$ gadmin config init -h
Initialize configuration

Usage:
  gadmin config init [flags]

Flags:
      --all            display every configurable entry
      --expert         display node assignment entries
      --ha             enable HA for init
  -h, --help           help for init
  -i, --input string   provide an input file name and init the configuration silently with the provided input file
      --template       show the template for init initialization

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config list

List all configurable entries or entry groups.

$ gadmin config list -h
List the available config entries or groups

Usage:
  gadmin config list <group|entry> [flags]

Description:
  List prints out the available config groups or config entries, which can be used
  in entry/group commands.

Flags:
      --basic   list basic entries only
  -h, --help    help for list

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin config set

$ gadmin config set -h
Configure the entry of given config entry name in a non-interactive manner

Usage:
  gadmin config set [EntryName] [EntryValue] [flags]

Description:
  [EntryName] [EntryValue] must be provided in pairs, and use space to separate
  each pair.

Flags:
  -h, --help   help for set

Global Flags:
      --debug         enable debug log output to stdout
      --file string   specify config file path

gadmin init

$ gadmin init -h

Init the whole cluster or given service

Usage:
  gadmin init [flags]
  gadmin init [command]

Description:
  Init command initializes the cluster/kafka. When "cluster" is specified,
  a config path is required.

Available Commands:
  cluster     Init the whole cluster
  kafka       Init the KAFKA

Flags:
  -h, --help   help for init

Global Flags:
      --debug   enable debug log output to stdout

Use "gadmin init [command] --help" for more information about a command.

gadmin license

Options for configuring your license.

$ gadmin license -h

Manage TigerGraph license

Usage:
  gadmin license [flags]
  gadmin license [command]

Available Commands:
  seed        Collects host signature and generates seed file for issuing license
  set         Set new license
  status      Display license status and info

Flags:
  -h, --help   help for license

Global Flags:
      --debug   enable debug log output to stdout

Use "gadmin license [command] --help" for more information about a command.

Generating a license seed

To generate a license seed, use the following command:

$ gadmin license seed <host_signature_type>
# host_signature_type: [aws|azure|gcp|hardware|node-id]

Depending on your host machine, you need to choose the appropriate host signature type. If you are generating the seed from a cloud instance, choose the corresponding cloud provider as your signature type.

If you are generating the seed from your own machine, choose either node-id or hardware.

  • The hardware option tells gadmin to collect information from your machine’s hardware as the host signature to generate the license seed. A signature produced by using this parameter will not be altered by software changes on the machine, including OS reinstalls. This is the usual choice.

  • node-id refers to the machine ID in the machine-id file located at /etc/machine-id and is a unique signature for the OS that identifies your machine. A reinstall of the OS may change the machine ID.

Applying a new license key

Example flow for applying a new license (which may be replacing an existing license key):

$ gadmin license set <new_license_key>
[   Info] Configuration has been changed.
Please use 'gadmin config apply' to persist the changes.

$ gadmin config apply
[Warning] No difference from staging config, config apply is skipped.
[   Info] Successfully applied configuration change. Please restart services to make it effective immediately.

$ gadmin restart
[   Note] Restart the service(s)? (y/N)y
[   Info] Stopping DICT ADMIN GSE NGINX GPE RESTPP KAFKASTRM-LL KAFKACONN TS3SERV GSQL TS3 GUI
[   Info] Starting ZK ETCD DICT KAFKA ADMIN GSE NGINX GPE RESTPP KAFKASTRM-LL KAFKACONN TS3SERV GSQL TS3 GUI

Once the license has been set and config has been applied, you can run gadmin license status to view the details of your license, including the expiration date and time.

$ gadmin license status
[Warning] License will expire in 6 days

   Issuer: TigerGraph Inc.
 Audience: tigergraph user
IssueTime: 2020-06-12 17:45:10 +0000 UTC
  EndTime: 2020-06-30 17:45:10 +0000 UTC
  Edition: Enterprise

Host:
	MaxCPUCore: 1024
	MaxPhysicalMemorySize: 1073741824.00MB
	MaxClusterNodeNumber: 1024

Topology:
	MaxVertexNumber: 9.007199254740991e+15
	MaxEdgeNumber: 9.007199254740991e+15
	MaxGraphNumber: 1000
	MaxTopologySize: 8.00MB

RuntimeMemory:
	MaxUserResidentSetSize: 1073741824.00MB

gadmin log

The gadmin log command will reveal the location of all commonly checked log files for the TigerGraph system.

$ gadmin log -h

List log files of the given services or all services

Usage:
  gadmin log [service name...] [flags]

Description:
  Service name should be a valid TigerGraph service name, for example, GSE, RESTPP
  or GPE.

Flags:
  -h, --help   help for log

Global Flags:
      --debug   enable debug log output to stdout
$ gadmin log
ADMIN  : /home/tigergraph/tigergraph/log/admin/ADMIN#1.out
ADMIN  : /home/tigergraph/tigergraph/log/admin/ADMIN.INFO
CTRL   : /home/tigergraph/tigergraph/log/controller/CTRL#1.log
CTRL   : /home/tigergraph/tigergraph/log/controller/CTRL#1.out
DICT   : /home/tigergraph/tigergraph/log/dict/DICT#1.out
DICT   : /home/tigergraph/tigergraph/log/dict/DICT.INFO
ETCD   : /home/tigergraph/tigergraph/log/etcd/ETCD#1.out
EXE    : /home/tigergraph/tigergraph/log/executor/EXE_1.log
EXE    : /home/tigergraph/tigergraph/log/executor/EXE_1.out
GPE    : /home/tigergraph/tigergraph/log/gpe/GPE_1#1.out
GSE    : /home/tigergraph/tigergraph/log/gse/GSE_1#1.out
GSE    : /home/tigergraph/tigergraph/log/gse/log.INFO
GSQL   : /home/tigergraph/tigergraph/log/gsql/GSQL#1.out
GSQL   : /home/tigergraph/tigergraph/log/gsql/log.INFO
GUI    : /home/tigergraph/tigergraph/log/gui/GUI#1.out
IFM    : /home/tigergraph/tigergraph/log/informant/IFM#1.log
IFM    : /home/tigergraph/tigergraph/log/informant/IFM#1.out
KAFKA  : /home/tigergraph/tigergraph/log/kafka/controller.log
KAFKA  : /home/tigergraph/tigergraph/log/kafka/kafka-request.log
KAFKA  : /home/tigergraph/tigergraph/log/kafka/kafka.log
KAFKA  : /home/tigergraph/tigergraph/log/kafka/server.log
KAFKA  : /home/tigergraph/tigergraph/log/kafka/state-change.log
KAFKACONN: /home/tigergraph/tigergraph/log/kafkaconn/KAFKACONN#1.out
KAFKACONN: /home/tigergraph/tigergraph/log/kafkaconn/kafkaconn.log
KAFKASTRM-LL: /home/tigergraph/tigergraph/log/kafkastrm-ll/KAFKASTRM-LL_1.out
KAFKASTRM-LL: /home/tigergraph/tigergraph/log/kafkastrm-ll/kafkastrm-ll.log
NGINX  : /home/tigergraph/tigergraph/log/nginx/logs/NGINX#1.out
NGINX  : /home/tigergraph/tigergraph/log/nginx/logs/error.log
NGINX  : /home/tigergraph/tigergraph/log/nginx/logs/nginx.access.log
NGINX  : /home/tigergraph/tigergraph/log/nginx/logs/nginx.error.log
RESTPP : /home/tigergraph/tigergraph/log/restpp/RESTPP#1.out
RESTPP : /home/tigergraph/tigergraph/log/restpp/log.INFO
TS3    : /home/tigergraph/tigergraph/log/ts3/TS3_1.log
TS3    : /home/tigergraph/tigergraph/log/ts3/TS3_1.out
TS3SERV: /home/tigergraph/tigergraph/log/ts3serv/TS3SERV#1.out
ZK     : /home/tigergraph/tigergraph/log/zk/ZK#1.out
ZK     : /home/tigergraph/tigergraph/log/zk/zookeeper.log

gadmin reset

$ gadmin reset -h

Reset the whole init or given service with its data

Usage:
  gadmin reset [service name...] [flags]

Description:
  Service name should be a valid TigerGraph service name, for example, GSE, RESTPP
  or GPE.

Flags:
  -y, --confirm   confirm to reset service
  -h, --help      help for reset

Global Flags:
      --debug   enable debug log output to stdout

gadmin restart

The gadmin restart command is used to restart one, many, or all TigerGraph services. You will need to confirm the restarting of services by either entering y (yes) or n (no). To bypass this prompt, you can use the -y flag to force confirmation.

$ gadmin restart -h

Restart services by service id

Usage:
  gadmin restart [serviceID...] [flags]

Description:
  ServiceID should be [serviceName][_partition][#replica], e.g., GSE_1#3. Leave
  replica field empty(e.g. GSE_1) to either refer to all replicas of given
  partition, or if the service has no replicas(e.g. EXE_1). Same for parititons.

Flags:
  -y, --confirm   confirm to restart service
  -h, --help      help for restart
      --no-dep    restart service without dependency

Global Flags:
      --debug   enable debug log output to stdout
$ gadmin restart all -y
[   Info] Stopping ZK ETCD DICT KAFKA ADMIN GSE NGINX GPE RESTPP KAFKASTRM-LL KAFKACONN TS3SERV GSQL TS3 IFM GUI
[   Info] Stopping CTRL
[   Info] Stopping EXE
[   Info] Starting EXE
[   Info] Starting CTRL
[   Info] Starting ZK ETCD DICT KAFKA ADMIN GSE NGINX GPE RESTPP KAFKASTRM-LL KAFKACONN TS3SERV GSQL TS3 IFM GUI

gadmin start

The gadmin start command can be used to start one, many, or all services.

$ gadmin start -h

Start services by service id

Usage:
  gadmin start [serviceID...] [flags]

Description:
  ServiceID should be [serviceName][_partition][#replica], e.g., GSE_1#3. Leave
  replica field empty(e.g. GSE_1) to either refer to all replicas of given
  partition, or if the service has no replicas(e.g. EXE_1). Same for parititons.
  If no serviceID is specified, it only starts services excluding the
  infrastructure. Use 'gadmin start all' to start all services.

Flags:
      --dry-run              dry run and output command to start the service
  -h, --help                 help for start
      --no-dep               start service without dependency
      --with-config string   start with given config file and dump it to each node (only for executor)
      --ignore-error         starting services with ignore-error will start all possible services, and ensure that the platform can still start and run normally when some services or some nodes are down

Global Flags:
      --debug   enable debug log output to stdout
$ gadmin start all
[   Info] Starting EXE
[   Info] Starting CTRL
[   Info] Starting ZK ETCD DICT KAFKA ADMIN GSE NGINX GPE RESTPP KAFKASTRM-LL KAFKACONN TS3SERV GSQL TS3 IFM GUI

gadmin status

Check the status of TigerGraph component servers:

$ gadmin status -h

Show current status of service

Usage:
  gadmin status [serviceID...] [flags]

Description:
  ServiceID should be [serviceName][_partition][#replica], e.g., GSE_1#3. Leave
  replica field empty(e.g. GSE_1) to either refer to all replicas of given
  partition, or if the service has no replicas(e.g. EXE_1). Same for parititons.
  If no serviceID is specified, it will show all service status

Flags:
  -h, --help      help for status
  -v, --verbose   report service status in detail

Global Flags:
      --debug   enable debug log output to stdout

Use gadmin status to report whether each of the main component servers is running (up) or stopped (off). The example below shows the normal status when the graph store is empty and a graph schema has not been defined:

$ gadmin status

+--------------------+-------------------------+-------------------------+
|    Service Name    |     Service Status      |      Process State      |
+--------------------+-------------------------+-------------------------+
|       ADMIN        |         Online          |         Running         |
|        CTRL        |         Online          |         Running         |
|        DICT        |         Online          |         Running         |
|        ETCD        |         Online          |         Running         |
|        GPE         |         Online          |         Running         |
|        GSE         |         Online          |         Running         |
|        GSQL        |         Online          |         Running         |
|        GUI         |         Online          |         Running         |
|        IFM         |         Online          |         Running         |
|       KAFKA        |         Online          |         Running         |
|     KAFKACONN      |         Online          |         Running         |
|    KAFKASTRM-LL    |         Online          |         Running         |
|       NGINX        |         Online          |         Running         |
|       RESTPP       |         Online          |         Running         |
|        TS3         |         Online          |         Running         |
|      TS3SERV       |         Online          |         Running         |
|         ZK         |         Online          |         Running         |
+--------------------+-------------------------+-------------------------+

You can also check the status of each instance using the verbose flag : gadmin status -v or gadmin status --verbose. This will show each machine’s status. See example below

$ gadmin status -v GPE

+--------------------+-------------------------+-------------------------+
|    Service Name    |     Service Status      |      Process State      |
+--------------------+-------------------------+-------------------------+
|      GPE_1#1       |         Warmup          |         Running         |
|      GPE_1#2       |         Warmup          |         Running         |
+--------------------+-------------------------+-------------------------+

Here are the most common service and process status states you might see from running the gadmin status command :

Service Status Definitions

  • Online - The service is online and ready.

  • Warmup - The service is processing the graph information and will be online soon.

  • Stopping - The service has received a stop command and will be down soon.

  • Offline - The service is not available.

  • Down - The service has been stopped or crashed.

  • StatusUnknown - The valid status of the service is not tracked.

Process State Status Definitions

  • Init - Process is initializing and will be in the running state soon.

  • Running - The process is running and available.

  • Zombie - There is a leftover process from a previous instance.

  • Stopped - The process has been stopped or crashed.

  • StatusUnknown - The valid status of the process is not tracked.

gadmin stop

The gadmin stop command can be used to stop one, many, or all TigerGraph services. You will need to confirm the restarting of services by either entering y (yes) or n (no). To bypass this prompt, you can use the -y flag to force confirmation.

$ gadmin stop -h

Stop services by service id

Usage:
  gadmin stop [serviceID...] [flags]

Description:
  ServiceID should be [serviceName][_partition][#replica], e.g., GSE_1#3. Leave
  replica field empty(e.g. GSE_1) to either refer to all replicas of given
  partition, or if the service has no replicas(e.g. EXE_1). Same for parititons.
  If no serviceID is specified, it only stops services excluding the
  infrastructure. Use 'gadmin stop all' to stop all services.

Flags:
  -y, --confirm   confirm to stop service
  -h, --help      help for stop
  --ignore-error  stopping services with ignore-error will stop all possible services, and ensure that the platform can still stop and run normally when some services or some nodes are down

Global Flags:
      --debug   enable debug log output to stdout
$ gadmin stop gsql
[   Note] Stop the service(s)? (y/N)y
[   Info] Stopping GSQL

gadmin version

$ gadmin version -h

Show the version information

Usage:
  gadmin version [flags]

Description:
  Show version information of all TigerGraph components, including repo name,
  version, git commit number, git commit datetime.

Flags:
  -h, --help   help for version

Global Flags:
      --debug   enable debug log output to stdout

More examples

Configuring memory use thresholds

TigerGraph offers two levels of memory thresholds using the following configuration settings:

SysAlertFreePct and SysMinFreePct

SysAlertFreePct setting indicates that the memory usage has crossed a threshold where the system will start throttling Queries to allow long-running queries to finish and release the memory.

SysMinFreePct setting indicates that the memory usage has crossed a critical threshold and the Queries will start aborting automatically to prevent GPE crash and system stability.

By default, SysMinFreePct is set at 10%, at which point Queries will be aborted.​

$ gadmin config entry GPE.BasicConfig.Env

GPE.BasicConfig.Env [ LD_PRELOAD=$LD_PRELOAD; LD_LIBRARY_PATH=$LD_LIBRARY_PATH; ]: The runtime environment variables, separated by ';'
✔ New: LD_PRELOAD=$LD_PRELOAD; LD_LIBRARY_PATH=$LD_LIBRARY_PATH;

Add this line to the existing config :
SysMinFreePct=20;SysAlertFreePct=70;

Your config line should now look like this :

GPE.BasicConfig.Env [ LD_PRELOAD=$LD_PRELOAD; LD_LIBRARY_PATH=$LD_LIBRARY_PATH; ]: The runtime environment variables, separated by ';'
✔ New: LD_PRELOAD=$LD_PRELOAD; LD_LIBRARY_PATH=$LD_LIBRARY_PATH;SysMinFreePct=20;SysAlertFreePct=30;

$ gadmin restart gpe -y

Example:

SysAlertFreePct=30 means when the system memory consumption is over 70% of the memory, the system will enter an alert state, and Graph updates will start to slow down.

SysMinFreePct=20 means 20% of the memory is required to be free. When memory consumption enters a critical state (over 80% memory consumption) queries will be aborted. automatically.

Configuring Nginx configuration template​

Follow the steps documented in this support article to update the Nginx configurations of your TigerGraph instance.