NuoDB Command

NuoDB Command (nuocmd) is a command line tool that enables you to control, monitor, and analyze a NuoDB domain (in NuoDB deployments where NuoDB Admin is being used for domain and database management). You manage the databases in a domain by managing Transaction Engines (TEs) and Storage Managers (SMs)..


NuoDB Command is a text-based tool that allows you to specify commands interactively or non-interactively. To use the tool interactively, use the nuocmd command along with tab key-invoked command line autocompletion. For more information, see Using Autocomplete for Commands.


nuocmd [options] subcommands

optional arguments:
-h, --help           show this help message and exit 
--api-server         API_SERVER the REST API server to send request to(default: localhost:8888)
--show-json          show the full JSON response
--show-json-fields   SHOW_JSON_FIELDS the JSON fields to show from the response
--client-key         CLIENT_KEY client key-pair if server requires client authentication 
                     (see'needClientAuth' REST setting); specified as a single file containing both <certificate> and <private key>, 
                      or as 'certificate,private key')
--server-cert        SERVER_CERT server certificate to verify when using HTTPS


Using Autocomplete for Commands

When you press the tab key twice after typing nuocomd, you are prompted to select the next value argument(s) based on the current command you have entered. To enable this tab key autocompletion in bash, run the following script:

. /opt/nuodb/drivers/pynuoadmin/nuocmd-complete

When autocompletion is enabled, and you press the tab key twice (after typing nuocmd), valid options and first-level subcommands are displayed.

add               create               --help               set               sign
--api-server      delete               hotcopy              show              start
capture           enforce              import               --show-json
--client-key      get                  remove               --show-json-fields
connect           -h                   --server-cert        shutdown

Thereafter, type any optional argument or subcommand (or part thereof) and press the tab key twice to autocomplete the command (or display the valid options) based on the context of what has already been entered.


Type nuocmd show and press tab twice and NuoDB Command displays the next set of valid choices.

nuocmd show (followed by the tab key)
archives         database-connectivity  --help
certificate      domain                 log-messages
database         -h                     regions

Required arguments and subcommands will be indicated at runtime. For example, type nuocmd show database and press the Enter key.

nuocmd show database (followed by the Enter key)
usage: nuocmd show database [-h] --db-name DB_NAME
[--num-incarnations NUM_INCARNATIONS | --all-incarnations | --skip-exited]
[--db-format DB_FORMAT]
[--process-format PROCESS_FORMAT]
[--exited-process-format EXITED_PROCESS_FORMAT]
nuocmd show database: error: argument --db-name is required

NuoDB Command features are documented within the utility. You can type a nuocmd subcommand then press the tab key twice to view the output. For example, type, nuocmd show -h:

nuocmd show -h
usage: nuocmd show [-h]

optional arguments:
  -h, --help            show this help message and exit

'show' subcommands:
    archives            show database archives
    certificate         output key-pair or certificate from a keystore as a
			 base64-encoded string according to RFC-7468
    database            show database state
			show the connectivity graph for a database
    domain              show summary of domain state
    log-messages        show log messages from running database processes
    regions             show regions