2.7.3 list-relations
The list-relations subcommand lists relations between servers.
Synopsis
asadmin [asadmin_options] list-relations [{--long={false|true} | --output output} [--header={false|true}]] [--relationtype relation_type_name] [--from server_name] [--to server_name] [target]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The list-relations subcommand lists the relations between servers.
This subcommand is supported only in the remote mode.
Execution permission
General user
Arguments
- --long={false|true}
-
Specifies whether to display detailed information, in a list, about the relation between the servers.
Type: Boolean
You can specify the following values:
-
true
Displays the relation name and its detailed information (relation type, dependent source server name, depended-on destination server name, and order number). If you specify true for this argument, you cannot specify the --output option.
-
false
Follows the specified --output and the --header options.
Default value: false
-
- --output output
-
Specifies the items to be displayed in a list and their order, which is specified by a comma separated list. Uppercase and lowercase letters are not distinguished for the specified values.
The items to be displayed in the list are displayed from the left, in the order specified by this option. The list is sorted and displays the left most item. In order to sort by the character strings, if you specify order for the leftmost item, sorting is not in the ascending order of the numerical values.
If this option is omitted, the relation name, relation type, dependent source server name, and the depended-on destination server name are displayed. However, if the --long option is set to true, this specification is followed.
Type: String
You can specify the following values:
-
name
Relation name
-
type
Relation type name
-
from
Dependent source server name
-
to
Depended-on destination server name
-
order
Order number
Default value: (None)
-
- --header={false|true}
-
Specifies whether to display the header information. If the --long option is set to true, this option is ignored.
Type: Boolean
You can specify the following values:
-
true
Displays the header information.
-
false
Does not display the header information.
Default value: (None)
-
- --relationtype relation_type_name
-
Specifies the relation type to filter dependency relation information.
Type: String
You can specify the following values:
-
prf-relation
PRF server relation
-
redirect
Redirect relation
Default value: (None)
If this option is omitted, the dependency relation information of the all relation types is displayed.
-
- --from server_name
-
Specify the name of dependent source server to filter dependency relation information.
Type: String
You can specify the following values:
-
Name of a dependent source server existing in the domain.
Default value: (None)
If this option is omitted, the dependency relation information of the all dependent source servers is displayed.
-
- --to server_name
-
Specify the name of depended-on destination server to filter dependency relation information.
Type: String
You can specify the following values:
-
Name of a depended-on destination server existing in the domain.
Default value: (None)
If this option is omitted, the dependency relation information of all the depended-on destination servers is displayed.
-
- target
-
Specifies the name of the object for which information is displayed.
Type: String
You can specify the following values:
-
domain
Displays information about all the dependency relations in a domain.
-
relation_name
Displays information about the specified dependency relation.
Default value: domain
-
Output Format
The first line is the header of the output information and displays a fixed character string, which indicates the output format.
Between columns, the longest character string within a column is separated from the beginning of the next column by two spaces.
NAME TYPE FROM TO ORDER relation_name relation_type_name dependent_source_server_name depended-on_destination_server_name order_number
relation_name: Displays the relation name.
relation_type_name: Displays the relation type name.
dependent_source_server_name: Displays the name of the dependent source server.
depended-on_destination_server_name: Displays the name of the depended-on destination server.
order_number: Displays the relation order number.
Examples
The following example displays the relation between all servers.
asadmin list-relations
Example of output:
relation1 prf-relation JavaEE1 PRF1 relation2 prf-relation Web1 PRF1 relation3 redirect Web1 JavaEE1 relation4 redirect Web1 JavaEE2 relation5 ex_relation_type1 custom_type1 Web1
The following example displays the relation between all the servers, with the header.
asadmin list-relations --long=true
Example of output:
NAME TYPE FROM TO ORDER relation1 prf-relation JavaEE1 PRF1 0 relation2 prf-relation Web1 PRF1 0 relation3 redirect Web1 JavaEE1 20 relation4 redirect Web1 JavaEE2 10 relation5 ex_relation_type1 custom_type1 Web1 0
The following example displays the relation between all the servers, without the header.
asadmin list-relations --long=true --header=false
Example of output:
relation1 prf-relation JavaEE1 PRF1 0 relation2 prf-relation Web1 PRF1 0 relation3 redirect Web1 JavaEE1 20 relation4 redirect Web1 JavaEE2 10 relation5 ex_relation_type1 custom_type1 Web1 0
The following example displays only the relation of the relation type redirect.
asadmin list-relations --relationtype redirect
Example of output:
relation3 redirect Web1 JavaEE1 relation4 redirect Web1 JavaEE2
The following example displays only the relation of the dependent source server named Web1.
asadmin list-relations --from Web1
Example of output:
relation2 prf-relation Web1 PRF1 relation3 redirect Web1 JavaEE1 relation4 redirect Web1 JavaEE2
The following example displays only the relation of the depended-on destination server named PRF1.
asadmin list-relations --to PRF1
Example of output:
relation1 prf-relation JavaEE1 PRF1 relation2 prf-relation Web1 PRF1
The following example displays only the relation of the relation name relation3.
asadmin list-relations relation3
Example of output:
relation3 redirect Web1 JavaEE1
The following example displays only the order numbers, relation names, and depended-on destination servers of the dependency relations whose dependent source server is Web1 and dependency relation type is redirect, sorted by order number.
asadmin list-relations --relationtype redirect --from Web1 --output order,name,to
Example of output:
10 relation4 JavaEE2 20 relation3 JavaEE1
Exit Status
Exit Status |
Explanation |
---|---|
0 |
Normal termination. |
1 |
Abnormal termination. |