Configuring Performance Manager Infrastructure using scripting

You can use scripting to configure a Performance Manager Infrastructure service.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Use the following steps to configure the Performance Manager Infrastructure (PMI) service for an application server:

Procedure

  1. Identify the application server and assign it to the s1 variable, for example:
    • Using Jacl:
      set s1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    • Using Jython:
      s1 = AdminConfig.getid('Cell:mycell/Node:mynode/Server:server1/') 
    where:
    set is a Jacl command
    s1 is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object representing the WebSphere Application Server configuration
    getid is an AdminConfig command
    Cell is an attribute
    mycell is the value of the Cell attribute
    Node is an attribute
    mynode is the value of the Node attribute
    Server is an attribute
    server1 is the value of the Server attribute
    Example output:
    server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
  2. Identify the PMI service that belongs to the server and assign it to the pmi variable, for example:
    • Using Jacl:
      set pmi [$AdminConfig list PMIService $s1]
    • Using Jython:
      pmi = AdminConfig.list('PMIService', s1)
      print pmi 
    where:
    set is a Jacl command
    pmi is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object representing the WebSphere Application Server configuration
    list is an AdminConfig command
    PMIService is an AdminConfig object
    s1 evaluates to the ID of the application server specified in step number 1
    Example output:
    (cells/mycell/nodes/mynode/servers/server1|server.xml#PMIService_1)
  3. Modify the attributes, for example:
    • Using Jacl:
      $AdminConfig modify $pmi {{enable true} {statisticSet all}}
    • Using Jython:
      AdminConfig.modify(pmi, [['enable', 'true'], ['statisticSet','all']]
    This example enables PMI service and sets the specification levels for all of the components in the server. The following specification levels are valid for the components.
    Important: The specification level values are case-sensitive.
    none No statistics are enabled.
    basic Statistics specified in J2EE 1.4, as well as top statistics like CPU usage and live HTTP sessions are enabled. This set is enabled out-of-the-box and provides basic performance data about runtime and application components.
    extended Basic set plus key statistics from various WebSphere Application Server components like WLM, and Dynamic caching are enabled. This set provides detailed performance data about various runtime and application components.
    all All statistics are enabled.
    custom Enable or disable statistics selectively.
  4. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 6:03:36 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-iseries&topic=txml_pmi
File name: txml_pmi.html