2.2.2 asadmin
Performs administrative tasks.
Synopsis
asadmin [--host host] [--port port] [--user admin-user] [--passwordfile filename] [--terse={true|false}] [--secure={false|true}] [--echo={true|false}] [--interactive={true|false}] [--detach={true|false}] [--help] [subcommand [options] [operands]]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The asadmin utility command performs administrative tasks for Java EE Server.
The asadmin utility has the following options:
-
asadmin utility options: These options control the behavior of the asadmin utility, not the subcommand. The asadmin utility options may precede or follow the subcommand, but asadmin utility options after the subcommands are deprecated. All asadmin utility options must either precede or follow the subcommand. If asadmin utility options are specified both before and after the subcommand, an error occurs.
-
Subcommand options: These options control the behavior of the subcommand, not the asadmin utility. Subcommand options must follow the subcommand.
The asadmin utility options and some subcommand options have a long form and a short form.
-
The long form of an option has two dashes (--) followed by an option word.
-
The short form of an option has a single dash (-) followed by a single character.
Most options require argument values, except Boolean options, which toggle to enable or disable a feature.
Operands specify the items on which the subcommand is to act. Operands must follow the argument values of subcommand options and are set off by a space, tab, or double dashes (--). The asadmin utility treats anything that follows the subcommand options and their values as an operand.
asadmin subcommands have timeouts which target communication between servers or the command processing time. As common timeouts for all the subcommands, there are read timeout and request timeout. For more details, refer to "AS_ADMIN_READTIMEOUT" in the asenv file, "configs.config.name.network-config.protocols.protocol.admin-listener.http.request-timeout-seconds" and "configs.config.name.network-config.protocols.protocol.sec-admin-listener.http.request-timeout-seconds" in "List of parameters used with the set and get subcommands".
The backslash (\) escape character is also required before a single quotes (') character or a double quotes (") character in an option that uses the colon as a delimiter.
The asadmin utility uses the colon character (:) as a delimiter for some options. The backslash (\) escape character is required if the colon is part of a property or an option of Java VM. Instead of using the backslash (\) escape character, you can use the double quotes (") character or single quotes (') character. The effects of the different types of quotes characters on the backslash (\) character are as follows:
-
Between double quotes (") characters, the backslash (\) character is a special character.
-
Between single quotes (') characters, the backslash (\) character is not a special character.
Execution permission
-
To run the subcommand and have access to the installation directory and domain directory, the user must be logged in to the machine that hosts the domain.
-
Superuser
Environment variable
The listed environment variables can be used to modify the default values of asadmin utility options.
-
AS_ADMIN_TERSE
-
AS_ADMIN_ECHO
-
AS_ADMIN_INTERACTIVE
-
AS_ADMIN_HOST
-
AS_ADMIN_PORT
-
AS_ADMIN_SECURE
-
AS_ADMIN_USER
-
AS_ADMIN_PASSWORDFILE
-
AS_ADMIN_HELP
-
AS_ADMIN_READTIMEOUT
Files
--passwordfile option requires a file containing password entries.
Arguments
- --help | -?
-
Displays the help text for the asadmin utility.
- --host host | -H host
-
Indicates the machine name where the DAS is running.
Type: String
The following values can be specified:
-
Machine name
Default value: localhost
-
- --port port | -p port
-
Indicates the HTTP port or HTTPS port for administration.
Type: String
The following values can be specified:
-
Machine name
Default value: 4848
-
- --user admin-user | -u admin-user
-
Indicates the user name of the authorized administrative user of the DAS. If you have authenticated to a domain using the login subcommand, you need not specify the --user option for subsequent operations on the domain.
Type: String
The following values can be specified:
-
Name of the user
Default value: N/A
-
- --passwordfile filename | -W filename
-
Specifies the name, including the full path of a file that contains password entries in a specific format. These password entries are stored in clear text in the password file. To provide additional security, the create-password-alias subcommand can be used to create aliases for passwords that are used by remote subcommands. The password for which the alias is created is stored in an encrypted form.
If an alias exists for a password, the alias is specified in the entry for the password as follows:
AS_ADMIN_password-name=${ALIAS=password-alias-name}
Type: String
The following values can be specified:
-
Path and name of the password file
Default value: N/A
-
- --terse={true|false} | -t={true|false}
-
Displays the output data in a concise format, optimized for use in scripts instead of, for reading by humans, if set to true. Typically, descriptive text and detailed status messages are also omitted from the output data.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --secure={true|false} | -s={true|false}
-
Indicates whether to use SSL/TLS to communicate with the DAS, if set to true.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --echo={true|false} | -e={true|false}
-
Echoes the command-line statement on the standard output, if set to true. The default value is false.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --interactive={true|false} | -I={true|false}
-
Specifies whether only the required options are prompted.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value:
-
true: If the asadmin utility is run from a console window.
-
false: If the asadmin utility is run from within a script.
-
- --detach={true|false}
-
Detaches and executes the specified asadmin subcommand in the background in detach mode, if set to true. The --detach option is useful for long-running subcommands and enables you to execute several independent subcommands from one console or script. The --detach option is specified before the subcommand.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
Examples
The following example shows all the applications deployed on the local host.
asadmin list-applications