WAS v8.5 > Script the application serving environment (wsadmin) > Use the wsadmin scripting AdminControl object for scripted administration

Identify attributes and operations for running objects using wsadmin.sh

We can use scripting to identify attributes and operations for running objects.

Before starting this task, wsadmin must be running. See the topic about starting the wsadmin scripting client. Use the attributes or operations commands of the Help object to find information on a running MBean in the server.

  1. Specify a running object.

  2. Use the attributes command to display the attributes of the running object:

    • Jacl:

        $Help attributes MBeanObjectName
    • Jython:

        Help.attributes(MBeanObjectName)

    Help attributes command description. Run the attributes command with an object name.

    Attribute Definition
    $ is a Jacl operator for substituting a variable name with its value
    Help is the object that provides general help and information for running MBeans in the connected server process
    attributes is a Help command
    MBeanObjectName is the string representation of the MBean object name that is obtained in step 2

  3. Use the operations command to find out the operations that are supported by the MBean:

    • Jacl:

        $Help operations MBeanObjectname
      or

        $Help operations MBeanObjectname operationName
    • Jython:

        Help.operations(MBeanObjectname)
      or

        Help.operations(MBeanObjectname, operationName)

    Help operations command description. Run the operations command with an object name and, optionally, an operation name.

    Attribute Definition
    $ is a Jacl operator for substituting a variable name with its value
    Help is the object that provides general help and information for running MBeans in the connected server process
    operations is a Help command
    MBeanObjectname is the string representation of the MBean object name that is obtained in step number 2
    operationName (optional) is the specified operation from which to obtain detailed information

    If we do not provide the operationName value, all the operations that are supported by the MBean return with the signature for each operation. If we specify the operationName value, only the operation specified returns and it contains details which include the input parameters and the return value.

    To display the operations for the server MBean:

    • Jacl:

      set server [$AdminControl completeObjectName type=Server,name=server1,*]
      $Help operations $server
    • Jython:

      server = AdminControl.completeObjectName('type=Server,name=server1,*')
      print Help.operations(server)

    To display detailed information about the stop operation:

    • Jacl:

        $Help operations $server stop
    • Jython:

        print Help.operations(server, 'stop')


Related concepts:

Help object for scripted administration using wsadmin.sh


Related


Start the wsadmin scripting client using wsadmin.sh
Use the wsadmin scripting AdminControl object for scripted administration


Reference:

Commands for the AdminControl object using wsadmin.sh
Commands for the Help object using wsadmin.sh


+

Search Tips   |   Advanced Search