HP-UX Workload Manager Toolkits User's Guide

HP-UX WLM Duration Management Toolkit and HP-UX WLM Toolkit for Base SAS Software
How do I use DMTK / SASTK?
Chapter 6 123
Example discovery command
The discovery command invoked in the previous section is given below.
Note that this example is merely a starting point; there are more
sophisticated ways to collect this information. Also be aware that there
are example discovery commands specifically for SAS users in:
/opt/wlm/toolkits/sas/examples/
In essence, this script:
1. Takes a workload group name on its command line
2. References a file where each line specifies:
An executable name
That executable’s profile value
That executable’s desired duration
3. Makes a list from the file’s executable names
4. Makes a list of active processes for the workload group
5. Checks the lists against each other:
Checks each active process in the workload group to see whether
there is data for it in the file from Step 2
6. Determines the process’s PID if there is a match in Step 5 else
returns to Step 3
7. Prints the process’s PID, profile value, and desired duration
8. Exits
The script is:
#!/usr/bin/sh
#
# Name:
# duration.sh
#
# Version information:
#
# (C) Copyright 2001-2005 Hewlett-Packard Development Company, L.P.
#
# $RCSfile: duration.sh,v $
# $Date: 2005/04/19 12:21:13 $
# $Revision: 1.6 $