Sun Java System Application Server Enterprise Edition 8.2 Administration Guide

The asadmin Command Usage

Use the asadmin utility to perform any administrative tasks for the Application Server. You can use this asadmin utility in place of using the Administration Console.

The asadmin utility invokes commands that identify the operation or task you wish to perform. These commands are case-sensitive. Short option arguments have a single dash (-); while long option arguments have two dashes (--). Options control how the utility performs a command. Options are also case-sensitive. Most options require argument values except boolean options which toggle to switch a feature ON or OFF. Operands appear after the argument values, and are set off by a space, a tab, or double dashes (--). The asadmin utility treats anything that comes after the options and their values as an operand.

Example 19–1 Syntax Example

asadmin command [-short_option] [short_option_argument]* [--long_option [long_option_argument]* [operand]*

asadmin create-profiler -u admin --passwordfile password.txt myprofiler

To access the man pages for the Application Server asadmin utility commands on the Solaris platform, add $AS_INSTALL/man to your MANPATH environment variable.

You can obtain overall usage information for any of the asadmin utility commands by invoking the --help option. If you specify a command, the usage information for that command is displayed. Using the --help option without a command displays a listing of all the available commands.

Example 19–2 help Command Example

asadmin --help displays general help

asadmin command --help displays help for the specified command.

This section contains the following topics:

Multi and Interactive Modes

The asadmin utility can be used in command shell invocation or multi command mode (known as the multimode command). In command shell invocation you invoke the asadmin utility from your command shell. asadmin executes the command, then exits. In multiple command mode, you invoke asadmin once, it then accepts multiple commands until you exit asadmin and return to the normal command shell invocation. Environment variables set while in multiple command mode are used for all subsequent commands until you exit multimode. You may provide commands by passing a previously prepared list of commands from a file or standard input (pipe). Additionally, you can invoke multimode from within a multimode session; once you exit the second multimode environment, you return to your original multimode environment.

You can also run the asadmin utility in interactive or non-interactive mode. By default, the interactive mode option is enabled. It prompts you for the required arguments. You can use the interactive mode option in command shell invocation under all circumstances. You can use the interactive mode option in multimode when you run one command at a time from the command prompt; and when you run in multimode from a file. Commands in multimode, when piped from an input stream, and commands invoked from another program, cannot run in the interactive mode.

Local Commands

Local commands can be executed without the presence of an administration server. However, it is required that the user be logged into the machine hosting the domain in order to execute the command and have access (permissions) for the installation and domain directories.

For commands that can be executed locally or remotely, if any one of the--host, --port, --user, and --passwordfile options are set, either in the environment or in the command line, the command will run in remote mode. Also, if none of the local options are set, either on the command line or in the environment, the command is executed locally by default. For commands that can be executed locally or remotely, if any one of the--host, --port, --user, and --passwordfile options are set, either in the environment or in the command line, the command will run in remote mode.

Remote Commands

Remote commands are always executed by connecting to an administration server and executing the command there. A running administration server is required. All the remote commands require the following common options:

Table 19–1 Remote Commands Required Options

Short Option 





The machine name where the domain administration server is running. The default value is localhost. 



The HTTP/S port for administration. This is the port to which you should point your browser in order to manage the domain. For example, http://localhost:4848. The default port number for Platform Edition is 4848.



The authorized domain administration server administrative username. If you have authenticated to a domain using the asadmin login command, then you need not specify the --user option on subsequent operations to this particular domain.



The -‐passwordfile option specifies the name of a file containing the password entries in a specific format. The entry for the password must have the AS_ADMIN_ prefix followed by the password name in uppercase letters.

For example, to specify the domain administration server password, use an entry with the following format: AS_ADMIN_PASSWORD=password, where password is the actual administrator password. Other passwords that can be specified include AS_ADMIN_PASSWORD, AS_ADMIN_USERPASSWORD, and AS_ADMIN_ALIASPASSWORD, AS_ADMIN_MAPPEDPASSWORD.

All remote commands must specify the admin password to authenticate to the domain administration server, either through-‐passwordfile or asadmin login, or interactively on the command prompt. The asadmin login command can be used only to specify the admin password. For other passwords, that must be specified for remote commands, use the -‐passwordfile or enter them at the command prompt.

If you have authenticated to a domain using the asadmin login command, then you need not specify the admin password through the -‐passwordfile option on subsequent operations to this particular domain. However, this is applicable only to AS_ADMIN_PASSWORD option. You will still need to provide the other passwords, for example, AS_ADMIN_USERPASSWORD, as and when required by individual commands, such as update-file-user.

For security reasons, passwords specified as an environment variable will not be read by asadmin.



If set to true, uses SSL/TLS to communicate with the domain administration server. 



If set to true (default), only the required password and user options are prompted. 



Indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-formatted data for consumption by a script. Default is false. 



Setting to true will echo the command line statement on the standard output. Default is false. 



Displays the help text for the command. 

The Password File

For security purposes, you can set the password for a command from a file instead of entering the password at the command line. The --passwordfile option takes the file containing the passwords. The valid contents for the file are:

Example 19–3 Passwordfile contents