The asadmin Utility
Usethe asadmin utility to perform any administrative tasks for the Application Server. You can
usethis asadmin utility in place of using the Administrator interface.
Theasadmin utility invokes subcommands that identify the operation or task you wish to
perform.Subcommands are case-sensitive. Short option arguments have a single dash (-); while
longoption arguments have two dashes (--). Options control how the utility performs a
subcommand.Options are also case-sensitive. Most options require argument values except
booleanoptions which toggle to switch a feature ON or OFF.Operands appear after the
argumentvalues, and are set o by a space, a tab, or double dashes (--). The asadmin utility
treatsanything that comes after the options and their values as an operand.
asadmincan be used in command shell invocation or multi command mode (known as
multimode).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
asadminonce, it then accepts multiple commands until you exit asadmin and return to the
normalcommand shell invocation. Environment variables set while in multiple command
modeare used for all subsequent commands until you exit multimode. You may provide
commandsby passing a previously prepared list of commands from a le or standard input
(pipe).Additionally, you can invoke multimode from within a multimode session; once you exit
thesecond multimode environment, you return to your original multimode environment.
Youcan also run the asadmin utility in interactive or non-interactive options. By default, the
interactiveoption is enabled. It prompts you for the required arguments. You can use the
interactiveoption in command shell invocation under all circumstances. You can use the
interactiveoption in multimode when you run one subcommand at a time from the command
prompt;and when you run in multimode from a le. Subcommands in multimode, when piped
froman input stream, and subcommands invoked from another program, cannot run in the
interactiveoption.
Localsubcommands 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
executethe subcommand and have access (permissions) for the installation and domain
directories.Remote subcommands are always executed by connecting to an administration
serverand executing the subcommand there. A running administration server is required. All
remotesubcommands require the following options:
-u--user authorized domain application server administrative username.
--passwordfilethe le containing the domain application server password in the
followingform: AS_ADMIN_PASSWORD=password. Where password is the actual administrator
password.
-H--host machine name where the domain application server is running.
-p--port port number of the domain application server listening for administration
requests.The default port number for Platform Edition is 4848.
Theasadmin Utility
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 2008232