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 6118
For other applications, implement the reporting represented by the
following pseudo-code, either inside the application or as an external
utility:
PID=process_id # Get the application’s PID
# wlmdurdc creates this file and checks it for data
file=/var/opt/wlm/tk_config/wlmdurdc.met.PID
point_in_dur=0 # Number points in the application’s duration
# at which "percent complete" data is reported
percent=pct_complete # Indicate the percent completed
if(file exists){ # Write the data to the file
write(file, "%d %d %d\n”, PID, point_in_dur, percent)
}
The wlmdurdc tool automatically creates the file wlmdurdc.met.PID and
uses any data present in it.
For an example of how to set up your discovery command, see the
“Example discovery command” on page 123.
Step 11. Start the applications in workload groups
NOTE You must start your applications in the correct groups; otherwise, WLM
controls a group’s CPU resources based on duration management data
for an application not in the group.
Next time you need to run the applications with duration management
in effect, start each of them with the prmrun command. To place
applications in the GroupA workload group, use the command:
% prmrun -g GroupA app1 app1_arguments
Similarly, to place applications in the GroupB workload group, use the
command:
% prmrun -g GroupB app2 app2_arguments