Configure a Performance Manager Infrastructure service using scripting

 

Procedure

  1. Start wsadmin

  2. Identify the application server and assign it to the s1 variable, for example:

    • Jacl

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

    • 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 WAS 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)
    

  3. Identify the PMI service that belongs to the server and assign it to the pmi variable, for example:

    • Jacl

      set pmi [$AdminConfig list PMIService $s1]
      

    • 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 WAS 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)
    

  4. Modify the attributes, for example:

    • Jacl

      $AdminConfig modify $pmi {{enable true} 
      {initialSpecLevel beanModule=H:cacheModule=H:connectionPoolModule=
      H:j2cModule=H:jvmRuntimeModule=H:orbPerfModule=H:servletSessionsModule
      =H:systemModule=H:threadPoolModule=H:transactionModule=H:
      webAppModule=H:webServicesModule=H:wlmModule=H:wsgwModule=H}}
      $AdminConfig save
      

    • Jython

      AdminConfig.modify(pmi, [['enable', 'true'], 
      ['initialSpecLevel', 'beanModule=H:cacheModule=H:connectionPoolModule=
      H:j2cModule=H:jvmRuntimeModule=H:orbPerfModule=H:servletSessionsModule=
      H:systemModule=H:threadPoolModule=H:transactionModule=H:webAppModule=H:
      webServicesModule=H:wlmModule=H:wsgwModule=H']])
      

    This example enables PMI service and sets the specification levels for all of components in the server. The following are the valid specification levels for the components:

    N represents none
    L represents low
    M represents medium
    H represents high
    X represents maximum

  5. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object