quality@glassfish.java.net

(unknown charset) Tiny tool for v3 admin CLI QL tests

From: (unknown charset) Jim Jiang <jj156416_at_sun.com>
Date: Sun, 07 Sep 2008 03:47:39 +0800
Hi,

I  have developed a tool called cmdant which is ant-base tool for CLI testing. It was used for some l10n testing before.
I did some modification for v3, hopefully it can be helpful for your Admin CLI QL testing.
Its feature includes run and records the command's output(include its return value) exactly, generate a report for checking.

The usage is very simple. Steps as below(Assume you already setup the ant environment):
1. put the cmdant.jar(attached) on the classpath. 
2. modify the build.xml(attached) according your testing requirement:
    For example, try to run the command:    "D:\work\gfqc\fishcat\b22\bin\asadmin.bat --help add-resources"
    2.1 change the cmdpath according where the GF you installed:
    <property name="cmdpath" value="D:\work\gfqc\fishcat\b22\bin"/>
   
   2.2 add the command to be tested as below:
    <target name="remote_help" >
        <cmd executable="asadmin.bat">
             <arg line="--help add-resources"/>
        </cmd>
    </target>


    For most case for asadmin, what your need to add is just the value for 'arg line'.
3. Run the tool as below:
   ant -logger cmdant.CmdLogger  remote_help (Generate the report.html,  see attached)
   ant remote_help  (Without report generated)

You can change the report layout by modify its template file 'test_output.template' which is in the cmdant.jar.

If you have the interest for the source, please let me know.

Regards,
Jim
 
Cmdant Executive Result

Cmdant Executive Result

Locale:    zh
OS:    Windows XP
Created:    Sun Sep 07 03:32:08 CST 2008
Total (Pass/Fail): 3(3/0)
Target Command Return
local_help asadmin.bat --help backup-domain

0

remote_help asadmin.bat --help add-resources

0

remote_help asadmin.bat --help list

0


Top asadmin.bat --help backup-domain Return:0

Administration Commands                          backup-domain(1)

NAME
     backup-domain - performs a backup on the domain

SYNOPSIS
     backup-domain  [--domaindir domain_directory]
     [--description description] [--echo={true | false}][--terse={true | false}]
     [--verbose=false] [domain_name]

DESCRIPTION
     The backup-domain command backs up  files  under  the  named
     domain. This command is supported in local mode only.

OPTIONS
     --domaindir                 This option specifies the parent
                                 directory  of  the  domain  upon
                                 which the command will  operate.
                                 The          default          is
                                 install_dir/domains.

     --description               A description  can  contain  any
                                 string to help identify the par-
                                 ticular backup. The  description
                                 is  displayed  as  part  of  the
                                 information for any backup.

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

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

     -v --verbose                Indicates that  output  data  is
                                 displayed with detailed informa-
                                 tion. Default is false.

OPERANDS
     domain_name                 This is the name of  the  domain
                                 to  be  backed up. If the domain
                                 is not specified  and  only  one
                                 domain  exists,  it will be used

Java EE 5           Last change: 30 Jan 2007                    1

Administration Commands                          backup-domain(1)

                                 automatically. If you have  more
                                 than one domain, it is mandatory
                                 to specify a domain name.

EXAMPLES
     Example 1 Using backup-domain

       asadmin> backup-domain --domaindir /opt/SUNWappserver/mydomaindir domain1
       Successfully backed up the domain

       Description: 1137030607263
       Backup Filename: /opt/SUNWappserver/mydomaindir/domain1/backups/sjsas_backup_v00001.zip
       Date and time backup was performed: Wed Jan 11 17:50:07 PST 2006
       Domains Directory: /opt/SUNWappserver/mydomaindir
       Domain Directory: /opt/SUNWappserver/mydomaindir/domain1
       Domain Name: domain1
       Name of the user that performed the backup: jondoe

EXIT STATUS
     0                           command executed successfully

     1                           error in executing the command

SEE ALSO
     restore-domain(1), list-backups(1)

Java EE 5           Last change: 30 Jan 2007                    2

     ---------------------------------------------        
asadmin.bat
     ---------------------------------------------        
Use "exit" to exit and "help" for online help.
asadmin> 
Top asadmin.bat --help add-resources Return:0

Administration Commands                          add-resources(1)

NAME
     add-resources - creates the resources specified  in  an  XML
     file

SYNOPSIS
     add-resources
     [--terse={true|false}][ --echo={true|false} ]
     [ --interactive={true|false} ] [ --host  host]
     [--port port] [--secure| -s ] [ --user  admin_user]
     [--passwordfile filename] [--help]
     [ --target  target]
     xml_file_path

DESCRIPTION
     The add-resources command creates the resources named in the
     specified XML file. The xml_file_path is the path to the XML
     file containing the resources to  be  created.  The  DOCTYPE
     must               be              specified              as
     http://www.sun.com/software/appserver/dtds/sun-
     resources_1_2.dtdin the resources.xml file.

     This command is supported in remote mode only.

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

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

     -I --interactive            If set to true  (default),  only
                                 the  required  password  options
                                 are prompted.

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

Java EE 5           Last change: 30 Jan 2007                    1

Administration Commands                          add-resources(1)

     -p --port                   The HTTP/S port for  administra-
                                 tion.  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 is 4848.

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

     -u --user                   The authorized  domain  adminis-
                                 tration   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.

     --passwordfile              The --passwordfile option speci-
                                 fies  the  name,  including  the
                                 full path, 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_MAPPEDPASSWORD,
                                 AS_ADMIN_USERPASSWORD,       and
                                 AS_ADMIN_ALIASPASSWORD.

                                 All remote commands must specify
                                 the  admin password to authenti-
                                 cate to the  domain  administra-
                                 tion  server,  either through --

Java EE 5           Last change: 30 Jan 2007                    2

Administration Commands                          add-resources(1)

                                 passwordfile or  asadmin  login,
                                 or  interactively on the command
                                 prompt. The asadmin  login  com-
                                 mand can be used only to specify
                                 the admin  password.  For  other
                                 passwords,  that  must be speci-
                                 fied 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.  How-
                                 ever, 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 com-
                                 mands, such as update-file-user.

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

                                 The    default     value     for
                                 AS_ADMIN_MASTERPASSWORD       is
                                 changeit.

     --help                      Displays the help text  for  the
                                 command.

     --target                    Specifies the target  for  which
                                 you  are creating the resources.
                                 Valid values are

                                     o    server,  which  creates
                                          the  resources  for the
                                          default server instance
                                          server   and   is   the
                                          default value

                                     o    domain,  which  creates
                                          the  resources  for the
                                          domain

Java EE 5           Last change: 30 Jan 2007                    3

Administration Commands                          add-resources(1)

                                     o    cluster_name,     which
                                          creates  the  resources
                                          for    every     server
                                          instance in the cluster

                                     o    instance_name,    which
                                          creates  the  resources
                                          for a particular server
                                          instance

OPERANDS
     xml_file_path               The path to the  XML  file  con-
                                 taining  the  resource(s)  to be
                                 created.  The  XML   file   must
                                 reside    in    the    <install-
                                 dir>/domains/domain1/config
                                 directory.   If  you  specify  a
                                 relative path or simply  provide
                                 the  name  of the XML file, this
                                 command will  prepend  <install-
                                 dir>/domains/domain1/config   to
                                 this operand.

                                 An example XML file follows.

       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE resources PUBLIC
         "-//Sun Microsystems Inc.//DTD Application Server 9.1 Domain//EN"
         "*http://www.sun.com/software/appserver/dtds/sun-resources_1_2.dtd*">

       <resources>
       <jdbc-connection-pool name="SPECjPool" steady-pool-size="100"
         max-pool-size="150" max-wait-time-in-millis="60000"
         pool-resize-quantity="2" idle-timeout-in-seconds="300"
         is-isolation-level-guaranteed="true"
         is-connection-validation-required="false"
         connection-validation-method="auto-commit"
         fail-all-connections="false"
         datasource-classname="oracle.jdbc.pool.OracleDataSource">
        <property name="URL"
          value="jdbc:oracle:thin:@iasperfsol12:1521:specdb"/>
        <property name="User" value="spec"/>
        <property name="Password" value="spec"/>
        <property name="MaxStatements" value="200"/>
        <property name="ImplicitCachingEnabled" value="true"/>
       </jdbc-connection-pool>
       <jdbc-resource enabled="true" pool-name="SPECjPool"
         jndi-name="jdbc/SPECjDB"/>
       </resources>

Java EE 5           Last change: 30 Jan 2007                    4

Administration Commands                          add-resources(1)

EXAMPLES
     Example 1 Using the add-resources command

     The following command creates resources using  the  contents
     of the XML file resource.xml:

       asadmin> add-resources --user admin --passwordfile passwords.txt
       --host localhost --port 4848 resource.xml
       =========================
       Added Resource Type: jdbc-connection-pool
       =========================
       Added Resource Type: jdbc-resource
       =========================
       Added Resource Type: persistence-manager-factory-resource
       Command add-resources executed successfully.

EXIT STATUS
     0                           command executed successfully

     1                           error in executing the command

SEE ALSO
     create-jdbc-connection-pool(1),     create-jdbc-resource(1),
     create-jms-resource(1),   create-jndi-resource(1),   create-
     javamail-resource(1),        create-persistence-resource(1),
     create-custom-resource(1)

Java EE 5           Last change: 30 Jan 2007                    5

     ---------------------------------------------        
asadmin.bat
     ---------------------------------------------        
Use "exit" to exit and "help" for online help.
asadmin> 
Top asadmin.bat --help list Return:0

Administration Commands                                   list(1)

NAME
     list - lists the configurable elements

SYNOPSIS
     list
     [--terse={true|false}][ --echo={true|false} ]
     [ --interactive={true|false} ] [ --host  host]
     [--port port] [--secure| -s ] [ --user  admin_user]
     [--passwordfile filename] [--help]
     [ --monitor =false]
     [dotted_parent_attribute_name]

DESCRIPTION
     Lists the  configurable  element.  On  Solaris,  quotes  are
     needed when executing commands with * as the option value or
     operand.

     The dotted notation follows these guidelines:

         o    Any list command that has a dotted name that is not
              followed by a wildcard (*) will get, as its result,
              the current node's immediate children. For example,
              list  --monitor server lists all immediate children
              belonging to the server node.

         o    Any list command that has a dotted name followed by
              a wildcard(*) will get, as its result, a hierarchi-
              cal tree of children nodes from the  current  node.
              For  example,  list --monitor server.applications.*
              will list all children of  applications  and  their
              subsequent child nodes and so on.

         o    Any list command that has a dotted name preceded or
              followed by a wildcard (*) of the form *dotted name
              or dotted * name or dotted name* will get,  as  its
              result,  all  nodes and their children matching the
              regular expression created by the provided matching
              pattern.

     An application server dotted name uses the "."  (period)  as
     a  delimiter  to separate the parts of a complete name. This
     is similar to how the "/" character is used to  delimit  the
     levels  in the absolute path name of a file in the UNIX file
     system.  The following rules apply while forming the  dotted
     names accepted by the get, set and list commands.  Note that
     a specific command has some additional semantics applied.

         o     A . (period) always separates two sequential parts
              of the name.

Java EE 5           Last change: 22 Dec 2004                    1

Administration Commands                                   list(1)

         o    A part of the name usually identifies  an  applica-
              tion server subsystem and/or its specific instance.
              For example:  web-container,  log-service,  thread-
              pool-1 etc.

         o    If any  part  of  the  name  itself  contains  a  .
              (period),  then  it  must be escaped with a leading
              \fR (backslash) so that the "." does not act like a
              delimiter.

         o    An * (asterisk) can be used anywhere in the  dotted
              name  and  it  acts  like the wildcard character in
              regular expressions.  Additionally, an *  can  col-
              lapse all the parts of the dotted name. Long dotted
              name like  "this.is.really.long.hierarchy"  can  be
              abbreviated to "th*.hierarchy". But note that the .
              always delimits the parts of the name.

         o    The top level switch for any dotted name is  -moni-
              tor  or  -m that is separately specified on a given
              command line. The presence or lack of  this  switch
              implies the selection of one of the two hierarchies
              for appserver management: monitoring and configura-
              tion.

         o    If you happen to know  the  exact  complete  dotted
              name  without any wildcard character, then list and
              get/set have a little difference  in  their  seman-
              tics:

             o    The list command treats  this  complete  dotted
                  name  as  the complete name of a parent node in
                  the abstract  hierarchy.  Upon  providing  this
                  name  to  list  command,  it simply returns the
                  names of the immediate children at that  level.
                  For   example,   list  server.applications.web-
                  module will list all the web  modules  deployed
                  to the domain or the default server.

             o    The get and set commands  treat  this  complete
                  dotted  name as the fully qualified name of the
                  attribute of a node (whose dotted  name  itself
                  is  the  name  that you get when you remove the
                  last part of this dotted name) and it gets/sets
                  the  value  of that attribute.  This is true if
                  such an attribute exists. You will never  start
                  with this case because in order to find out the
                  names of attributes of a particular node in the
                  hierarchy,  you must use the wildcard character
                  *.    For   example,   server.applications.web-
                  module.JSPWiki.context-root   will  return  the
                  context-root of the web-application deployed to

Java EE 5           Last change: 22 Dec 2004                    2

Administration Commands                                   list(1)

                  the domain or default server.

         o    server(usually the first part of the complete  dot-
              ted  name)  can be replaced with the name of a par-
              ticular server instance of interest (e.g., server1)
              and  you'll  get  the  information  of  that server
              instance, remaining part of the dotted name remain-
              ing  the  same. Note that the dotted names that are
              available in such other server instances are  those
              from  the monitoring hierarchy because these server
              instances don't have a way to expose the configura-
              tion hierarchy.

     The list command is the progenitor of navigational capabili-
     ties  of  these  three  commands.  If you want to set or get
     attributes of a particular application server subsystem, you
     must know its dotted name. The list command is the one which
     can guide you to find the dotted name of that subsystem. For
     example, to find out the modified date (attribute) of a par-
     ticular file in a large file  system  that  starts  with  /.
     First  you  must  find  out the location of that file in the
     file system, and then look at its attributes.  Therefor, two
     of  the  first  commands  to  understand  the hierarchies in
     appserver are: * list "*" and * list * -monitor. The  sorted
     output of these commands is typically of the following form:

         Command                                    Output
     ___________________________________________________________________________________

Java EE 5           Last change: 22 Dec 2004                    3

Administration Commands                                   list(1)

     list *

                                o    default-config

                                o    default-config.admin-service

                                o    default-config.admin-service.das-config

                                o    default-config.admin-service.jmx-connector.system

                                o    default-config.admin-service.jmx-
                                     connector.system.ssl

                                o    default-config.availability-service

                                o    default-config.availability-service.jms-
                                     availability

                                o    default-config.diagnostic-service

                                o    default-config.ejb-container

                                o    . . .

                                o    default-config.http-service.http-listener.http-
                                     listener-1

                                o    default-config.http-service.http-listener.http-
                                     listener-2

                                o    . . .

                                o    default-config.iiop-service

                                o    . . .

                                o    default-config.java-config

                                o    . . .

                                o    domain

                                o    domain.clusters

                                o    domain.configs

                                o    domain.resources

                                o    domain.resources.jdbc-connection-pool.DerbyPool

                                o    domain.resources.jdbc-connection-pool._CallFlowPool

Java EE 5           Last change: 22 Dec 2004                    4

Administration Commands                                   list(1)

                                o    domain.resources.jdbc-connection-pool._TimerPool

                                o    . . .

                                o    server

                                o    server-config

                                o    cerver-config.admin-service

                                o    server-config.admin-service.das-config

                                o    server-config.admin-service.jmx-connector.system

                                o    server-config.admin-service.jmx-
                                     connector.system.ssl

                                o    server-config-availability-servicce

                                o    server-config.availability-service.jms-availability

                                o    server-config.diagnostic-service

                                o    server-config.ejb-container

                                o    . . .

                                o    server.log-service

                                o    server.log-service.module-log-levels

                                o    . . .

                                o    server.session-config

                                o    server.session-config.session-manager

                                o    server.session-config.session-manager.manager-
                                     properties

                                o    server.session-config.session-manager.store-
                                     properties

                                o    server.session-config.session-properties

                                o    server.thread-pools

                                o    server.thread-pools.thread-pool.thread-pool-1

                                o    server.transaction-service

                                o    server.web-container

Java EE 5           Last change: 22 Dec 2004                    5

Administration Commands                                   list(1)

                                o    server.web-container-availability
     list -monitor *

                                o    server

                                o    server.applications

                                o    server.applications._JWSappclients

                                o    server.applications._JWSappclients.sys.war

                                o    server.applications.adminapp

                                o    server.applications.admingui

                                o    server.connector-service

                                o    server.http-service

                                o    server.http-service.server

                                o    server.jms-service

                                o    server.jvm

                                o    server.orb

                                o    server.orb.connection-managers

                                o    server.resources

                                o    server.thread-pools

     Consequently, the list command is the entry point  into  the
     navigation  of the application server's s management hierar-
     chies.  Take note of the output of the list command:

         o    The output lists one element per line.

         o     Every element on a line is a  complete-dotted-name
              of a management component that is capable of having
              attributes. Note that none of these lines show  any
              kind of attributes at all.

     The output of thelist command is  a  list  of  dotted  names
     representing  individual  application  server components and
     subsystems.  Every component or subsystem is capable of hav-
     ing zero or more attributes that can be read and modified.

Java EE 5           Last change: 22 Dec 2004                    6

Administration Commands                                   list(1)

     With thelist command you can drill down through the  hierar-
     chy  in a particular branch of interest. For example, if you
     want to find the configuration of the http-listener  of  the
     domain  (the  default server, whose ID is "server"). Here is
     how you could proceed on a UNIX terminal:

      ID                                 Command                                                         Output/Comment
     ____________________________________________________________________________________________________________________________________________
     1      list "*" | grep http | grep listener

                                                                                         1.   default-config.http-service.http-listener.http-
                                                                                              listener-1

                                                                                         2.   default-config.http-service.http-listener.http-
                                                                                              listener-2

                                                                                         3.   server-config.http-service.http-listener.admin-
                                                                                              listener

                                                                                         4.   server-config.http-service.http-listener.http-
                                                                                              listener-1

                                                                                         5.   server-config.http-service.http-listener.http-
                                                                                              listener-2

                                                                                         6.   server-http-service.http-listener.admin-listener

                                                                                         7.   server.http-service.http-listener.http-listener-1

                                                                                         8.   server.http-service.http-listener.http-listener-2

Java EE 5           Last change: 22 Dec 2004                    7

Administration Commands                                   list(1)

     2      To   find    the    listener    that                                server.http-service.http-
            corresponds  to  the  default  http-                                listener.http-listener-
            listener where the web  applications                                1.acceptor-threads           =
            in the domain/server are deployed:                                  1server.http-service.http-
                                                                                listener.http-listener-
                     1.   Examine the dotted name starting with item number 7   1.address                    =
                          in above output.                                      0.0.0.0server.http-
                                                                                service.http-listener.http-
                     2.   Use the get command as shown in its usage.            listener-1.blocking-enabled  =
                 the attributes of the http-listener in context.                falseserver.http-
                                                                                service.http-listener.http-
                                                                                listener-1.default-virtual-
                                                                                server  =   serverserver.http-
                                                                                service.http-listener.http-
                                                                                listener-1.enabled           =
                                                                                trueserver.http-service.http-
                                                                                listener.http-listener-
                                                                                1.external-port  =server.http-
                                                                                service.http-listener.http-
                                                                                listener-1.family            =
                                                                                inetserver.http-service.http-
                                                                                listener.http-listener-1.id  =
                                                                                http-listener-1server.http-
                                                                                service.http-listener.http-
                                                                                listener-1.port              =
                                                                                8080server.http-service.http-
                                                                                listener.http-listener-
                                                                                1.redirect-port  =server.http-
                                                                                service.http-listener.http-
                                                                                listener-1.security-enabled  =
                                                                                falseserver.http-
                                                                                service.http-listener.http-
                                                                                listener-1.server-name
                                                                                =server.http-service.http-
                                                                                listener.http-listener-
                                                                                1.xpowered-by = true

     Making use of both list and get commands, it is straightfor-
     ward to reach a particular component of interest.

     To get the monitoring information of a particular  subsystem
     you must:

         1.   Use the set command to set an appropriate  monitor-
              ing level for the component of interest.

         2.   Obtain the various information about the  JVM  that
              the application server domain is running.

Java EE 5           Last change: 22 Dec 2004                    8

Administration Commands                                   list(1)

      ID                Command                       Output/Comment
     _______________________________________________________________________
     1      list server* | grep monitoring    server-config.monitoring-
                                              serviceserver-
                                              config.monitoring-
                                              service.module-monitoring-
                                              levelsserver.monitoring-
                                              serviceserver.monitoring-
                                              service.module-
                                              monitoring-levelsNote     that
                                              this is the list  command.  It
                                              only   shows   the  hierarchy,
                                              nothing else.  Using  the  '|'
                                              and  "grep"  narrows  down the
                                              search effectively.  Now,  you
                                              can  choose server.monitoring-
                                              service to set the  attributes
                                              of various attributes that can
                                              be monitored.This is the  con-
                                              figuration  data  because this
                                              setting will be  persisted  to
                                              the   server's   configuration
                                              store.
     2      get server.monitoring-service.*   You  can  try  the  number  of
                                              attributes  that are presently
                                              available with monitoring ser-
                                              vice.  Here  is the output: No
                                              matches  resulted   from   the
                                              wildcard  expression.  This is
                                              because this fully dotted name
                                              does  not  have any attributes
                                              at all. Logically, you try the
                                              next    one   and   that   is:
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels. Again, use  the  wild-
                                              card  character to get ALL the
                                              attributes  of  a   particular
                                              component.

Java EE 5           Last change: 22 Dec 2004                    9

Administration Commands                                   list(1)

     3      get          server.monitoring-   server.monitoring-
            service.module-monitoring-        service.module-monitoring-
            levels.*                          levels.connector-connection-
                                              pool  = OFF server.monitoring-
                                              service.module-monitoring-
                                              levels.connector-service = OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.ejb-container   =   OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.http-service    =   OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.jdbc-connection-pool  =
                                              OFF         server.monitoring-
                                              service.module-monitoring-
                                              levels.jms-service    =    OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.jvm        =        OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.orb        =        OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.thread-pool    =    OFF
                                              server.monitoring-
                                              service.module-monitoring-
                                              levels.transaction-service   =
                                              OFF         server.monitoring-
                                              service.module-monitoring-
                                              levels.web-container = OFF The
                                              JVM  monitoring  is at a level
                                              OFF. It  must  be  changed  in
                                              order to make the JVM monitor-
                                              ing information available. The
                                              other valid values for all the
                                              monitoring level are: LOW  and
                                              HIGH.  use  the set command to
                                              set the value appropriately.
     4      set          server.monitoring-   server.monitoring-
            service.module-monitoring-        service.module-monitoring-
            levels.jvm=HIGHThere   is    no   levels.jvm = HIGHNow, the  JVM
            space  before  or  after  the =   information  can  be  obtained
            sign.                             using the get command and mon-
                                              itoring switch. But remember ,
                                              when you switch to  the  moni-
                                              toring  hierarchy,  start with
                                              the list command again.

Java EE 5           Last change: 22 Dec 2004                   10

Administration Commands                                   list(1)

     5      list --monitor * | grep jvm       server.jvm   server.jvm.class-
                                              loading-system
                                              server.jvm.compilation-system
                                              server.jvm.garbage-collectors
                                              server.jvm.garbage-
                                              collectors.Copy
                                              server.jvm.garbage-
                                              collectors.MarkSweepCompact
                                              server.jvm.memory
                                              server.jvm.operating-system
                                              server.jvm.runtime
                                              server.jvm.thread-system
                                              server.jvm.thread-
                                              system.thread-1    .    .    .
                                              server.jvm.thread-
                                              system.thread-793823
                                              server.jvm.thread-
                                              system.thread-793824
                                              server.jvm.thread-
                                              system.thread-793825
                                              server.jvm.thread-
                                              system.thread-793826
                                              server.jvm.thread-
                                              system.thread-793827
                                              server.jvm.thread-
                                              system.thread-9The  JRE  1.5.0
                                              monitorable   components   are
                                              exposed  in an elegant manner.
                                              This is what you see when con-
                                              nected  by the JConsole.  Now,
                                              to know more about the  class-
                                              loading  system  in  the  JVM,
                                              this     is     how     you'll
                                              proceed.Note  that now you are
                                              interested in  the  attributes
                                              of  a  particular  leaf  node.
                                              Thus the command  is  get  not
                                              list.

Java EE 5           Last change: 22 Dec 2004                   11

Administration Commands                                   list(1)

     6      get -monitor  server.jvm.class-   server.jvm.class-loading-
            loading-system.*                  system.dotted-name           =
                                              server.jvm.class-loading-
                                              system       server.jvm.class-
                                              loading-
                                              system.loadedclasscount-count
                                              =    7328    server.jvm.class-
                                              loading-
                                              system.loadedclasscount-
                                              description  =  No Description
                                              was                  available
                                              server.jvm.class-loading-
                                              system.loadedclasscount-
                                              lastsampletime = 1133819508973
                                              server.jvm.class-loading-
                                              system.loadedclasscount-name =
                                              LoadedClassCount?
                                              server.jvm.class-loading-
                                              system.loadedclasscount-
                                              starttime    =   1133819131268
                                              server.jvm.class-loading-
                                              system.loadedclasscount-unit =
                                              count        server.jvm.class-
                                              loading-
                                              system.totalloadedclasscount-
                                              count          =         10285
                                              server.jvm.class-loading-
                                              system.totalloadedclasscount-
                                              description =  No  Description
                                              was                  available
                                              server.jvm.class-loading-
                                              system.totalloadedclasscount-
                                              lastsampletime = 1133819508972
                                              server.jvm.class-loading-
                                              system.totalloadedclasscount-
                                              name  = TotalLoadedClassCount?
                                              server.jvm.class-loading-
                                              system.totalloadedclasscount-
                                              starttime   =    1133819131268
                                              server.jvm.class-loading-
                                              system.totalloadedclasscount-
                                              unit          =          count
                                              server.jvm.class-loading-
                                              system.unloadedclasscount-
                                              count          =          2957
                                              server.jvm.class-loading-
                                              system.unloadedclasscount-
                                              description  =  No Description
                                              was                  available
                                              server.jvm.class-loading-
                                              system.unloadedclasscount-
                                              lastsampletime = 1133819508973

Java EE 5           Last change: 22 Dec 2004                   12

Administration Commands                                   list(1)

                                              server.jvm.class-loading-
                                              system.unloadedclasscount-name
                                              =          UnloadedClassCount?
                                              server.jvm.class-loading-
                                              system.unloadedclasscount-
                                              starttime    =   1133819131268
                                              server.jvm.class-loading-
                                              system.unloadedclasscount-unit
                                              = countYou cansee  that  10285
                                              is the total number of classes
                                              loaded by the Virtual Machine.
                                              Whereas,  2957  is  number  of
                                              classes unloaded, since it was
                                              started.   ,Similarly, you can
                                              explore  attributes   of   the
                                              other subsystems as well.

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

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

     -I --interactive            If set to true  (default),  only
                                 the  required  password  options
                                 are prompted.

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

     -p --port                   The HTTP/S port for  administra-
                                 tion.  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 is 4848.

Java EE 5           Last change: 22 Dec 2004                   13

Administration Commands                                   list(1)

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

     -u --user                   The authorized  domain  adminis-
                                 tration   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.

     --passwordfile              The --passwordfile option speci-
                                 fies  the  name,  including  the
                                 full path, 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_MAPPEDPASSWORD,
                                 AS_ADMIN_USERPASSWORD,       and
                                 AS_ADMIN_ALIASPASSWORD.

                                 All remote commands must specify
                                 the  admin password to authenti-
                                 cate to the  domain  administra-
                                 tion  server,  either through --
                                 passwordfile or  asadmin  login,
                                 or  interactively on the command
                                 prompt. The asadmin  login  com-
                                 mand can be used only to specify
                                 the admin  password.  For  other
                                 passwords,  that  must be speci-
                                 fied for  remote  commands,  use
                                 the --passwordfile or enter them
                                 at the command prompt.

Java EE 5           Last change: 22 Dec 2004                   14

Administration Commands                                   list(1)

                                 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.  How-
                                 ever, 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 com-
                                 mands, such as update-file-user.

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

                                 The    default     value     for
                                 AS_ADMIN_MASTERPASSWORD       is
                                 changeit.

     --help                      Displays the help text  for  the
                                 command.

     --monitor                   defaults to  false;  if  set  to
                                 false,  the  configurable attri-
                                 bute values are returned. If set
                                 to  true, the monitorable attri-
                                 bute values are returned.

OPERANDS
     dotted_parent_element_name  configurable or monitorable ele-
                                 ment name.

EXAMPLES
     Example 1 Using list to view all dotted-name prefixes

       asadmin> list --user admin --passwordfile password.txt
       --port 5001 "*"
       server
       server.admin-service
       server.admin-service.das-config
       server.application-ref.MEjbApp
       server.application-ref.__ejb_container_timer_app
       server.application-ref.adminapp

Java EE 5           Last change: 22 Dec 2004                   15

Administration Commands                                   list(1)

       server.application-ref.admingui
       server.application-ref.com_sun_web_ui
       server.applications
       server.applications.j2ee-application.MEjbApp
       server.applications.j2ee-application.__ejb_container_timer_app
       server.applications.web-module.adminapp
       server.applications.web-module.admingui
       server.applications.web-module.com_sun_web_ui
       server.ejb-container
       server.http-service
       server.http-service.http-listener.admin-listener
       server.http-service.http-listener.http-listener-1
       server.http-service.http-listener.http-listener-2
       server.iiop-service
       server.iiop-service.iiop-listener.SSL
       server.iiop-service.iiop-listener.SSL.ssl
       server.iiop-service.iiop-listener.SSL_MUTUALAUTH
       server.iiop-service.iiop-listener.SSL_MUTUALAUTH.ssl
       server.iiop-service.iiop-listener.orb-listener-1
       server.iiop-service.orb
       server.java-config
       server.jms-service
       server.jms-service.jms-host.default_JMS_host
       server.log-service
       server.log-service.module-log-levels
       server.mdb-container
       server.monitoring-service
       server.monitoring-service.module-monitoring-levels
       server.resource-ref.jdbc/PointBase
       server.resource-ref.jdbc/__TimerPool
       server.resources
       server.resources.jdbc-connection-pool.PointBasePool
       server.resources.jdbc-connection-pool.__TimerPool
       server.resources.jdbc-resource.jdbc/PointBase
       server.resources.jdbc-resource.jdbc/__TimerPool
       server.security-service
       server.security-service.audit-module.default
       server.security-service.auth-realm.certificate
       server.security-service.auth-realm.file
       server.security-service.jacc-provider.default
       server.thread-pools
       server.thread-pools.thread-pool.thread-pool-1
       server.transaction-service
       server.virtual-server.__asadmin
       server.virtual-server.server
       server.web-container

     Example 2 Using list for an application

       asadmin> list --user admin --passwordfile password.txt

Java EE 5           Last change: 22 Dec 2004                   16

Administration Commands                                   list(1)

       --host localhost --port 4848 server.applications.j2ee-application
       server.applications.j2ee-application.MEjbApp
       server.applications.j2ee-application._ejb_container_timer_app
       server.applications.j2ee-application.stateless-simple

     Example 3 Using list for a web module

       asadmin> list --user admin --passwordfile password.txt
       --host localhost --port 4848 server.applications.web-module
       server.applications.web-module.adminapp
       server.applications.web-module.adminguip
       server.applications.web-module.com_sun_web_ui

EXIT STATUS
     0                           command executed successfully

     1                           error in executing the command

SEE ALSO
     get(1), set(1)

Java EE 5           Last change: 22 Dec 2004                   17

     ---------------------------------------------        
asadmin.bat
     ---------------------------------------------        
Use "exit" to exit and "help" for online help.
asadmin>