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 6124
#
# Example discovery script for wlmdurdc.
#
# This script is launched by wlmdurdc to discover a process that is to be
# managed. It returns a PID, the profile value in CPU seconds,
# and the desired duration in seconds. This script could be used when
# multiple process will be run in the same workload group at different
# times.
#
#
# The output of duration.sh is the input to wlmdurdc:
# * Process ID
# * Profile value (CPU time needed to finish process in integer seconds)
# * Desired duration (in integer seconds)
#
# This script expects the group and metric names on the command line:
PRM_GROUP=$1
WLM_METRIC=$2
# If you use this script, you must first create a config file. There needs
# to be a config file for each WLM metric in the WLM configuration file.
# Config file format:
#
# {executable name} {profile value} {desired duration}
#
# The executable name is the base name of the executable. This can be seen
# in the output of ps -e. The following example is for the my_process
# executable that has a profile value of 100 CPU seconds and a desired
# duration of 200 seconds.
#
# Example:
# my_process 100 200
#
if [ “x$PRM_GROUP” = “x” ]; then
echo “ERROR: WLM workload group needed”
exit 1
fi
if [ “x$WLM_METRIC” = “x” ]; then
echo “ERROR: WLM metric name needed”
exit 1
fi
JOB_CONFIG_FILE=”/tmp/profiles/${PRM_GROUP}/${WLM_METRIC}”