Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Configure servers with scripting


Configure the Performance Monitoring Infrastructure using scripting

We can use wsadmin.sh to configure the Performance Monitoring Infrastructure (PMI) in the environment. PMI enables the server to collect performance data from various product components. PMI provides information about average system resource usage statistics, with no correlation between the data across different components.

There are two ways to perform this task. Complete the steps in this topic to use the AdminConfig object to modify your server configuration. Alternatively, you can use the configurePerformanceMonitoringService Jython script in the AdminServerManagement script library to configure PMI. The wsadmin tool automatically loads the script when the tool starts. Use the following syntax to configure PMI settings using the configurePerformanceMonitoringService script:

AdminServerManagement.configurePerformanceMonitoringService(nodeName, serverName, enable, initialSpecLevel,   otherAttributeList)
For additional information and argument definitions, see the documentation for the AdminServerMananagment script library.


Procedure

  1. Start wsadmin.sh.

  2. Identify the application server of interest.

    Use the AdminConfig object and the getid command to retrieve the configuration ID of the application server of interest, and assign it to the s1 variable, as the following example demonstrates:

      ### Jacl

      set s1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
      

      ### Jython

      s1 = AdminConfig.getid('Cell:mycell/Node:mynode/Server:server1/')
      

    Description of elements. The previous commands consist of the following elements:

    Element Description
    set Jacl command
    s1 Variable name
    $ Jacl operator for substituting a variable name with its value
    AdminConfig Object representing the product configuration
    getid AdminConfig command
    Cell Attribute
    mycell Value of the Cell attribute
    Node Attribute
    mynode Value of the Node attribute
    Server Attribute
    server1 Value of the Server attribute
    Example output:

    server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
    

  3. Identify the PMI service that belongs to the server.

    Use the AdminConfig object and the list command to identify the PMI service, and assign it to the pmi variable, as the following example demonstrates:

      ### Jacl

      set pmi [$AdminConfig list PMIService $s1]
      

      ### Jython

      pmi = AdminConfig.list('PMIService', s1)
      print pmi
      

    Description of elements. The previous commands consist of the following elements:

    Element Description
    set Jacl command
    pmi Variable name
    $ Jacl operator for substituting a variable name with its value
    AdminConfig Object that represents the application server configuration
    list AdminConfig command
    PMIService AdminConfig object
    s1 Evaluates to the ID of the application server of interest
    Example output:

    (cells/mycell/nodes/mynode/servers/server1|server.xml#PMIService_1)
    

  4. Modify the PMI configuration attributes.

    Use the AdminConfig object and the modify command to modify the PMI configuration attributes, as the following example demonstrates:

      ### Jacl

      $AdminConfig modify $pmi {{enable true} {statisticSet all}}
      

      ### 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 specification levels are case-sensitive values.

    Description of specification levels. The following specification levels are valid for the components.

    Specification level Description
    none No statistics are enabled.
    basic Statistics specified in Java Enterprise Edition (Java EE), 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 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.

  5. Save the configuration changes.

    Save the configuration changes:

    AdminConfig.save()
    

  6. Synchronize the node.

    Use the syncActiveNode or syncNode scripts in the AdminNodeManagement script library to propagate the configuration changes to node or nodes.

    • Use the syncActiveNodes script to propagate the changes to each node in the cell:
      AdminNodeManagement.syncActiveNodes()
      

    • Use the syncNode script to propagate the changes to a specific node:
      AdminNodeManagement.syncNode("myNode")
      


Enable PMI
Use the wsadmin scripting AdminConfig object for scripted administration


Related


Performance Monitoring Infrastructure settings
Server settings configuration scripts
Node administration scripts
Commands for the AdminConfig object using wsadmin.sh

+

Search Tips   |   Advanced Search