CGE CLI Common Options

Description of options common to all CGE CLI (except cge-launch) commands.

Certain options that are common to all commands and are provided by the CGE CLI are described in the following table:

Table 1. Common Command Line Options
OptionArgument(s)Default ValueExamplePurpose
Communication Options
--db-host

--dbhost

Host localhost --db-host machine Specifies the host on which the database is running
--db-port

--dbport

Port 3750--db-port 12345Specifies the port on which the database is running
--i

--identity

Identity directory ~/.ssh -i /my/custom/identity Specifies the path to a SSH identity directory to use for authenticating to the server. When omitted, several default locations are tried and the first valid location is used
--keep-alive-timeoutSeconds60--keep-alive-timeout 30Configures the connection keep alive time out. As of CGE 3.1UP00, connections are cached and kept alive. This results in improved performance, especially in situations that require many requests to be issued to the database.
--no-keep-aliveN/AN/A--no-keep-aliveDisables connection keep alive. This may be useful in multi user environments, where many users are sharing the same database
--trust-keysN/AN/A--trust-keysWhen this option is set, new host keys will automatically be trusted even when running in non-interactive mode. This is useful in environments where the database port (and thus the host and port combination required to trust the key for) may frequently change. This option should only be used when connecting to trusted database servers.
--usernameUsernamealice--username aliceWhen set, use this username to connect to the database. In order for this to work, it is required to have access to a key pair which has been authorized for the given username. Therefore, this does not permit the user to impersonate arbitrary users, instead it allows the user to act as another user only if the user has an appropriate key pair.
Client Logging Options
--debug

--verbose

N/AN/A--verboseEnables verbose mode, which includes setting the log level to debug. All logging output goes to stderr, allowing it to be separated from command output, which goes to stdout.

If the --quiet option is also specified, then the verbose mode takes precedence.

--quiet N/AN/A--quietEnables quiet mode, which sets the log level to error, causes little/no logging to go stderr. All logging output is transmitted to stderr, allowing it to be separated from command output, which is transmitted to stdout.

If one of the verbose mode options is also specified, precedence is given to the verbose mode.

--traceN/AN/A--traceEnables trace mode, which includes setting the log level to trace. All logging output is transmitted to stderr, allowing it to be separated from the command output, which is sent to stdout.

If the --quiet option is also specified, precedence is given to the verbose mode

--reveal--revealReveals user data in client side logging output. By default any logging that contains items considered to be user data e.g. Queries, query plans etc is obscured to prevent data leakage. Enabling this option disables that functionality.
Server Configuration Options
--nvp Name and value N/A--nvp cge.DoMemoryLeakDetection 1 Sets a NVP to send to the server as part of the request. Usually necessary only if asked by Cray support to enable advanced options for debugging an issue.
--log-disable N/AN/A--log-disableDisables all server side logging for the request
--log-level Log_level N/A--log-level 16

Supported log levels include:

  • 0=None
  • 1=Off
  • 2=Error
  • 4=Warn
  • 8=Info
  • 16=Debug
  • 32=Trace
Changes the server logging level for the request.

Supported values may be obtained by using the log-lookup command.

--log-string Log_string N/A--log-level Foo Specifies a string that will be included in every server log line pertaining to the request. This is useful if it is required to isolate and extract the log lines specific to a request.
--log-keyword-level Keyword_level N/A--log-keyword-level 41 32 Changes the server logging level for a specific logging keyword. The database server uses a keyword-based system that enables extracting log levels specific to certain parts of the request processing or changing the log level for a specific keyword.

Supported values may be obtained by using the log-lookup and keyword-lookup commands.

--log-global-keywordKeyword N/A--log-global-keyword 41 Specifies that a given keyword should be included in all log lines.
Miscellaneous Options
-h command

--help command

N/AN/A--help checkpointPrints the help information for the command rather than running the command
--batch

--non-interactive

N/AN/A--non-interactive When set, this option guarantees that the script will never prompt the user for input, i.e. it will never use stdin. This may cause some commands to fail if they would require any user input other than the provided options. This is useful when invoking the CLI in a non-interactive context.
--configDir

--config-dir

DirectoryN/A--configDir/configpathSets the first location to search for configuration files
--N/AN/A--Used to separate the options from the arguments to the command. This is useful if arguments may be mistaken for options. Any arguments seen after the -- are treated as arguments even if they could otherwise be considered as options.