Describes the command-line interface.
The usage of the tadm
command-line utility is as follows:
tadm --version|-V
Displays the version of the CLI.
tadm --help|-?
Displays this page in text format.
tadm
help
|-?
Displays this page in text format.
tadm --user|-u admin-user [--password-file|-w] [admin-passwd-file] [--host|-h admin-host] [--port|-p admin-port] [[--rcfile|-R rcfile]
launches tadm
in shell mode.
tadm
subcommand
--help
Displays help for the specified subcommand.
tadm
subcommand
options
Displays the usage syntax for the specified subcommand.
Plain text: Type the text as is.
Example: option
Italicized text: Placeholder for the value of an option or operand. When running CLI commands, you should substitute such placeholders with appropriate values.
Example: parameter
Text in square brackets: Optional argument.
Example: [argument
]
Asterisk (*) after text in square brackets: Optional argument; you can specify multiple instances.
Example: [argument
]*
Plus symbol (+) after text: Mandatory argument; you can specify multiple instances.
Example: [argument
]+
Vertical bar symbol (|) between text: Optional values: specify one of them.
Example: opt1|opt2
The command-line interface (CLI) enables you to configure and administer Oracle Traffic Director. Use the command-line tool tadm
to execute the administration commands.
You can invoke tadm
in standalone mode, shell mode, or file mode.
Standalone mode – In standalone mode, you can directly invoke the CLI specifying the desired command, options, and operands. On completion of a command, the CLI returns to the shell.
---------------------------------------------------------
Shell mode — In the shell mode, you can invoke the CLI from a shell that is embedded within tadm
. On completion of the command, the CLI returns to the shell. You can exit the shell by typing exit
or quit
. To enter the Shell mode, user
, password
, and port
options are mandatory. If the port details are not specified, the default port is used. The default port number is 8989.
Example:
---------------------------------------------------------
$ tadm --user=admin --port=8081 --password-file=./admin.passwd
tadm> list-configs
www.example.org
--------------------------------------------------------
File mode — In the file mode, you can create a plain text containing a list of valid commands. The file mode accepts user
and password-file
when you invoke tadm
.
Example:
---------------------------------------------------------
$ cat sample.tcl
set tadm::command false
set x [list-configs
]
puts $x
$ tadm --user=admin --password-file=./admin.passwd --commands-file=sample.tcl
--------------------------------------------------------
You can also set the following tadm
variables to modify the overall behavior of tadm
:
tadm::command
: (Applicable only in file mode.) Enables you to output all commands to stdout
and stderr
. If this variable is set to true
, exceptions do not stop the execution of commands, rather, they are printed in the stdout
and the next command is executed. You can set this variable in the commands-file.
-------------------------------------------------------
$ cat commands.tcl
set tadm::command true
set x [list-configs
]
puts $x
In this example, commands.tcl
is the name of the file which contains a list of valid commands.
--------------------------------------------------------
tadm::savehist
: (Applicable only in the shell mode.) If set to true
, all tadm
commands that you execute are saved in the tadm::histfile
file. The tadm::histfile
is saved in your home directory. You can set this variable in the tadm
environment using the tadm set tadm::savehist true
command.
tadm::file
: This is set to true
if you are executing the tadm
commands in file mode.
tadm::tokenize
: If set to true
, tadm
parses the log files in a TCL friendly format.
tadm::log_date_format
: Use this variable to define the date format in the log files. The default format is MM/dd/yyyy:HH:mm:ss
.
tadm::date_format
: Use this variable to define a date format in which a user can enter a date. The default value is the date format of the current locale.
tadm::property_separator
: Use this variable to define the property separators. The default value is the equal sign (=). (for example, tadm> set tadm::property_separator :).
tadm::field_separator
: Use this variable to define the field or column separator. The default value is a blank space ( ). (for example, tadm> set tadm::field_separator |).
tadm::field_format
: Use this variable to define the display format of a field or column. Default value: %-15s
. (for example, tadm> set tadm::field_format %-15s|).
The term Common Options is used in this document, and in the CLI man pages, to represent the following options:
Options such as --user
, --port
, and --host
, which are required to connect to the administration server. These options need not be specified in the shell mode.
Options such as --echo
and --verbose
, which are common across several commands.
The following is the full list of common options.
--user|-u
Specify the user name of the authorized Oracle Traffic Director administrator.
Note:
The--user|-u
option is not mandatory for the following CLI commands:
configure-server
unconfigure-server
start-snmp-subagent
stop-snmp-subagent
The --user|-u
option is not required while executing the reset-admin-password
command.
When you use the configure-server
command to create the administration server, --user|-u
option specifies the log-in name for the administration server. It defaults to admin
while configuring the administration server.
When you use the configure-server
command to create an administration node, --user|-u
option specifies the log-in name that should be used to connect to the administration server. This is a mandatory option while configuring the administration node.
--password-file|-w
Specify the name and the location of the password file. The password file contains the password to authenticate administrators to the administration server. Apart from the administration password, you can also specify other passwords such as bind-password
, user-password
, and token-pin
. If you do not specify this option, you will be prompted for a password when you execute the command. You will also be prompted for password(s) if the required password(s) are not mentioned in the password file you specified.
A sample password file is as follows:
tadm_password=tadm-password tadm_bind_password=bind-password tadm_user_password=user-password tadm_token_pin=token-pin tadm_new_token_pin=new-token-password tadm_admin_password=admin-password tadm_<token_name>=token-pin
Note:
tadm_<token_name>
is applicable only for the start-instance
command. You can use tadm_<token_name>
to set multiple token pins to start instances on multiple nodes.
For example, a default token named internal
is configured for any instance. The entry for the default token in the password-file will be tadm_internal=88888888
.
--host|-h
Specify the name of the computer on which the administration server is running. The default host is localhost
.
Note:
This option is required only if you are connecting to the administration server remotely. The--host|-h
option is not required while executing the reset-admin-password
command.--port|-p
Specify the SSL port number of the administration server. The default port is 8989
.
Note:
The--port|-p
option is not required while executing the reset-admin-password
command.
If you are creating the administration server using the configure-server
command, --port|-p
option specifies the SSL port on which the administration server should listen.
If you are creating an administration node using the configure-server
command, --port|-p
option specifies the SSL port of the remote administration server with which the administration node should be registered.
--no-ssl|-N
Specify this option to use a plain text connection to communicate with the administration server. The default connection is SSL
.
--rcfile|-R
Specify the name of the rcfile
that must be loaded when you start tadm
. The default file is ~/.tadmrc
. The .tadmrc
file is a TCL file that is loaded before any command is executed. You can use the long options as variables by changing the hyphen (-) in the option name to underscore (_) and prefixing it with tadm
. For example:
--config
can be set as set tadm_config config1
--key-type
can be set as set tadm_key_type ecc
A sample rcfile
is as follows:
set tadm_config sampleconfig set tadm_password mypassword set tadm_nodehost sample.mail.com
--echo|-e
Specify this option to print this command on the standard output before executing. This option also prints the default value for all the non-mandatory options that you do not provide in the command.
--no-prompt|-Q
If you specify this option, tadm
will not prompt you for passwords while executing this command. Use this option if you have defined all passwords in a password file and specified the file using the --password-file
option.
--verbose|-v
Specify this option to display a verbose output.
--command|-C
Specify the name of the commands file which contains the list of tadm
commands. For more information about commands file, see the description of the file mode.
The following exit codes are returned:
0 – command executed successfully
1 to 4 – connection failure errors
10 to 22 – parsing errors
33 to 43 – input/output errors
44 to 56 – general errors; for example, invalid configuration value
76 to 96 – generic back-end errors
110 to 123 – errors that are specific to Mbeans
125 and above – unknown errors