8.2 dcli Syntax

This topic describes the syntax for the dcli utility.

Syntax

dcli [options] [command]

Command Arguments

  • options: command options
  • command: Any command that can be run from an operating system prompt.

Command Options

Table 8-1 dcli Options

Option Description

--batchsize=MAXTHDS

Limits the number of parallel execution threads, which limits the number of target servers on which to run the operation in parallel.

-c CELLS

Specifies a comma-delimited list of target servers to which commands are sent.

--ctimeout=CTIMEOUT

Specifies the maximum time in seconds for initial connection to a target server.

-d DESTFILE

Specifies the target destination directory or file on remote servers to be used when copying files or directories using the -f option.

-f FILE

Specifies the files or file template to be copied to the servers. These files are not run. These files can be script files to be run later. The files are copied to the default home directory of the user on the target server.

-g GROUPFILE

Specifies a file containing a list of target servers to which commands are sent. The servers can be identified by host names or IP addresses.

-h, --help

Displays help text and then exits.

--hidestderr

Hide standard error messages (STDERR) for commands run remotely using SSH.

-k

Sets up SSH user-equivalence for the current user to the servers specified with the -c or -g option by appending public key files to the authorized_keys file on servers.

--key-with-one-password

This option simplifies SSH user-equivalence setup by prompting once for the user password and using the specified password for all the configured servers. If not specified, then a password prompt occurs for each server.

-l USERID

Identifies the user to log in as on remote servers. The default is the celladmin user.

--root-exadatatmp

This option uses the root user, similar to -l root. However, instead of using /root as the default working directory, this option uses /var/log/exadatatmp, which avoids alerts generated by Advanced Intrusion Detection Environment (AIDE) for files written to /root.

--maxlines=MAXLINES

Limits output from each target server to the specified number of lines. By default, the output limit from each target server is 100000 lines.

-n

Abbreviates nonerror output. Servers that return normal output (return code of 0) only have the server name listed.

The -n and -r options cannot be used together.

-r REGEXP

Abbreviates the output lines that match a regular expression. All output lines with that pattern are deleted from output, and the servers names from those output lines are listed on one line.

The -r and -n options cannot be used together.

-s SSHOPTIONS

Passes a string of options to SSH.

--scp=SCPOPTIONS

Passes a string of options to scp if different from sshoptions.

--serial

Serializes the process over Oracle Exadata Storage Servers.

--showbanner, --sh

Show the banner of the remote node when using SSH.

-t

Displays the target servers that are named with the -c option or in the groupfile identified by the -g option.

--unkey

Drops keys from the target authorized_keys file on Oracle Exadata Storage Servers.

-v

Prints the verbose version of messages to stdout.

--version

Shows the version number of the program and then exits.

--vmstat=VMSTATOPS

Runs the vmstat utility on the target servers with the specified command options.

-x EXECFILE

Specifies the command file to be copied and run on the servers. The specified file contains a list of commands. A file with the .scl extension is run by the CellCLI utility. A file with a different extension is run by the operating system shell on the server. The file is copied to the default home directory of the user on the target server.

Usage Notes

For commands that contain punctuation that would be interpreted by the local shell, enclose the command in double quotation marks. If the command includes the following characters, then outer quotation marks and escape characters are required:

  • $ (dollar sign)
  • ' (quotation mark)
  • < (less than)
  • > (greater than)
  • ( ) (parentheses)

The backslash (\) is the escape character that allows the characters to be passed to the CellCLI utility without being interpreted by the remote shell.

If the command is complex in terms of punctuation that need escape characters, then it may require that the command be put in a script, and run using the -x option. Within a script, the escape character is not required.

Troubleshooting

If the local dcli process is terminated, then remote commands might continue, but their output and status is unknown.

Return values from the dcli utility are:

  • 0: The file or command was copied, and run successfully on all servers.
  • 1: One or more servers could not be reached or remote execution returned a nonzero status.
  • 2: A local error prevented any command execution.

If any servers are down or do not respond, then a message is written to stderr listing the unresponsive servers. The operations continue on the other servers, and the return code after completion is 1.