WebSphere Virtual Enterprise, Version 6.1.1
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS


servicepolicy.py script

You can use the servicepolicy.py script to perform operations on service policies from the command line, such as creating service policies, removing service policies, and editing transaction classes.

Purpose

You can perform the following actions with the servicepolicy.py script:
  • Create a service policy
  • Remove a service policy
  • Create a transaction class
  • Remove a transaction class

To create, modify, and remove service policies and transaction classes, you must have configurator or administrator administrative privileges.

Location

The servicepolicy.py script is located in the install_root/bin directory.

Usage

The script usage for general help follows:
./wsadmin.sh|bat -lang jython -f servicepolicy.py
The script usage for operation-specific help follows:
./wsadmin.sh|bat -lang jython -f servicepolicy.py operation --help

Operations

You can perform the following operations with the servicepolicy.py script:
  • createServicePolicy: Creates a service policy with the specified options. You must create and associate transaction classes separately.
    • --spname: Specifies a name for the service policy that is unique in the cell.
    • --spgt: Specifies an integer that represents one of the following service policy goal types:
      • 0: discretionary
      • 1: average response time
      • 2: percentile response time
      • 4: completion time
    • --spgv: Specifies a service policy goal value for non-discretionary goals. This value is assumed to be in milliseconds if you do not specify the units.
    • --spgvu: Specifies an integer that represents a service policy goal value for non-discretionary goals. This value is assumed to be in milliseconds if you do not specify the units.
      • 0: milliseconds
      • 1: seconds
      • 2 : minutes
    • --sppgv: Specifies an integer that represents a percentile value for a service policy with percentile response time goal between 1 and 100.
    • --spi: Specifies an integer that represents one of the following service policy goal types:
      • 1: highest
      • 2: higher
      • 3: high
      • 4: medium
      • 5: low
      • 6: lower
      • 7: lowest
    • --spd: Specifies a service policy description.
  • removeServicePolicy: Deletes an existing service policy with the specified option.
    • --spname: Specifies the unique name for the service policy that you want to remove.
  • createTransactionClass: Creates a transaction class with the specified options.
    • --spname: Specifies a name for the service policy that is unique in the cell.
    • --tcname: Specifies a name for the transaction class that you want to create that is unique in the cell.
    • --tcd: Specifies a transaction class description.
  • removeTransactionClass: Removes a transaction class with the specified option. All Uniform Resource Identifiers (URIs) in the transaction class are no longer associated with the parent service policy. If a request comes in for these URIs and they are not associated with a new service policy and transaction class, they are classified to the default service policy with a discretionary goal.
    • --tcname: Specifies the cell-unique name for the transaction class that you want to remove.

Example

Create a service policy:
./wsadmin.sh|bat -lang jython -f servicepolicy.py createServicePolicy --spname Platinum --spgt 2 --spgv 3000 --spgvu 0 --sppgv 80 --spi 5
Remove an existing service policy:
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeServicePolicy --spname Bronze 
Create a new transaction class:
./wsadmin.sh|bat -lang jython -f servicepolicy.py createTransactionClass --spname Platinum --tcname PlatinumWorkload --tcd 'my platinum workload'
Remove an existing transaction class:
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeTransactionClass --tcname PlatinumWorkload  



Related tasks
Defining a service policy
Related reference
Reference topic    

Terms of Use | Feedback

Last updated: Oct 30, 2009 1:31:01 PM EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.ops.doc/info/reference/rxml_servicepolicy.html