
Administration Commands                                    set(1)

NAME
     set - sets the values of attributes

SYNOPSIS
     set
     [--terse={true|false}][ --echo={true|false} ]
     [ --interactive={true|false} ] [ --host  host]
     [--port port] [--secure| -s ] [ --user  admin_user]
     [--passwordfile filename] [--help]
     attributename=value

DESCRIPTION
     Sets the values of one or more configurable attribute.

     A 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.

         o    A part of the name usually identifies  a  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    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.

              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

Java EE 5            Last change: 3 Oct 3008                    1

Administration Commands                                    set(1)

                  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
                  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.

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.

Java EE 5            Last change: 3 Oct 3008                    2

Administration Commands                                    set(1)

     -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.

     -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

Java EE 5            Last change: 3 Oct 3008                    3

Administration Commands                                    set(1)

                                 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.

                                 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.

OPERANDS
     attributename=value         identifies  the  attribute  name
                                 and its value. See the Reference
                                 for a listing of  the  available
                                 attribute names.

Java EE 5            Last change: 3 Oct 3008                    4

Administration Commands                                    set(1)

EXAMPLES
     Example 1 Using set

       asadmin> set --user admin --passwordfile password.txt --host localhost
       --port 4848 server.transaction-service.automatic-recovery=true

EXAMPLES
     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 subsystem, you must know its dot-
     ted 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 particular 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.

     A part of the sorted output of the list "*"command is  typi-
     cally of the following form:

     Example 2 Listing all dotted names

       asadmin> list "*"
       default-config.sip-service.sip-protocol.sip-timers
       default-config.thread-pools
       default-config.thread-pools.thread-pool.thread-pool-1
       default-config.transaction-service
       default-config.web-container
       default-config.web-container-availability
       domain
       domain.clusters
       domain.configs
       domain.converged-lb-configs
       domain.converged-lb-configs.converged-lb-config-1

     Note -

       The   web-container-availability   node   and   the   ejb-
       container-availability    do    not   appear   under   the
       availability-service  node.  These  dotted  names  can  be
       accessed as follows:

       default-config.web-container-availability

Java EE 5            Last change: 3 Oct 3008                    5

Administration Commands                                    set(1)

       default-config.web-container-availability

       The  jms-availability  child  node   appears   under   the
       availability-service node as follows:

       default-config.availability-service.jms-availability

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

     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:

     Example 3 Listing  all  dotted  names  containing  http  and
     listener

       asadmin list "*"|grep http|grep listener
       default-cluster-config.http-service.http-listener.http-listener-1
       default-cluster-config.http-service.http-listener.http-listener-2
       default-cluster-config.http-service.http-listener.http-listener-2.ssl
       default-cluster.http-service.http-listener.http-listener-1
       default-cluster.http-service.http-listener.http-listener-2
       default-cluster.http-service.http-listener.http-listener-2.ssl
       default-config.http-service.http-listener.http-listener-1
       default-config.http-service.http-listener.http-listener-2
       default-config.http-service.http-listener.http-listener-2.ssl
       server-config.http-service.http-listener.admin-listener
       server-config.http-service.http-listener.http-listener-1
       server-config.http-service.http-listener.http-listener-2
       server-config.http-service.http-listener.http-listener-2.ssl
       server.http-service.http-listener.admin-listener
       server.http-service.http-listener.http-listener-1
       server.http-service.http-listener.http-listener-2
       server.http-service.http-listener.http-listener-2.ssl

     Consequently, the list command is the entry point  into  the
     navigation  of  the management hierarchies. 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

Java EE 5            Last change: 3 Oct 3008                    6

Administration Commands                                    set(1)

              of a management component that is capable of having
              attributes. Note that none of these lines show  any
              kind of attributes at all.

     You can now use this output of the list command to find  the
     attributes of the default http-listener where the web appli-
     cations in the domain/server are deployed.

     Example 4 Getting the attributes of a listener

       asadmin get server.http-service.http-listener.http-listener-1
       server.http-service.http-listener.http-listener-1.acceptor-threads = 1
       server.http-service.http-listener.http-listener-1.address = 0.0.0.0
       server.http-service.http-listener.http-listener-1.blocking-enabled = false
       server.http-service.http-listener.http-listener-1.default-virtual-server = server
       server.http-service.http-listener.http-listener-1.enabled = true
       server.http-service.http-listener.http-listener-1.external-port =
       server.http-service.http-listener.http-listener-1.family = inet
       server.http-service.http-listener.http-listener-1.id = http-listener-1
       server.http-service.http-listener.http-listener-1.port = 51378
       server.http-service.http-listener.http-listener-1.property.accesslog
       = ${com.sun.aas.instanceRoot}/logs/access
       server.http-service.http-listener.http-listener-1.property.proxiedProtocols = ws/tcp
       server.http-service.http-listener.http-listener-1.redirect-port =
       server.http-service.http-listener.http-listener-1.security-enabled = false
       server.http-service.http-listener.http-listener-1.server-name =
       server.http-service.http-listener.http-listener-1.xpowered-by = true

EXAMPLES
     Example 5 Exploring JVM attributes

     You can use the following set of list and  get  commands  to
     explore JVM attributes.

       asadmin list server*|grep monitoring
       server-config.monitoring-service
       server-config.monitoring-service.module-monitoring-levels
       server.monitoring-service
       server.monitoring-service.module-monitoring-levels

     Note 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

Java EE 5            Last change: 3 Oct 3008                    7

Administration Commands                                    set(1)

     attributes that can be monitored.

     This is the configuration data because this setting will  be
     persisted to the server's configuration store.

       asadmin get server.monitoring-service.*

     You can try the number  of  attributes  that  are  presently
     available with monitoring service. 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 wildcard character to get ALL the  attributes  of  a
     particular component.

       asadmin get server.monitoring-service.module-monitoring-levels.*
       server.monitoring-service.module-monitoring-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

Java EE 5            Last change: 3 Oct 3008                    8

Administration Commands                                    set(1)

     The JVM monitoring is at a level OFF. It must be changed  in
     order  to make the JVM monitoring information available. The
     other valid values for all the monitoring level are: LOW and
     HIGH. use the set command to set the value appropriately.

       asadmin set server.monitoring-service.module-monitoring-levels.jvm=HIGH
       erver.monitoring-service.module-monitoring-levels.jvm = HIGH

     Now, the JVM information can be obtained using the get  com-
     mand  and  monitoring switch. But remember , when you switch
     to the monitoring hierarchy, start  with  the  list  command
     again.

       asadmin 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-9

     Note that now you are interested in the attributes of a par-
     ticular leaf node. Thus the command is get not list.

       asadmin get -m  server.jvm.class-loading-system.*
       server.jvm.class-loading-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

Java EE 5            Last change: 3 Oct 3008                    9

Administration Commands                                    set(1)

       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
       server.jvm.class-loading-system.unloadedclasscount-name = UnloadedClassCount?
       server.jvm.class-loading-system.unloadedclasscount-starttime = 1133819131268
       server.jvm.class-loading-system.unloadedclasscount-unit = count

     You can see 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.

EXIT STATUS
     0                           command executed successfully

     1                           error in executing the command

SEE ALSO
     get(1), list(1)

Java EE 5            Last change: 3 Oct 3008                   10

