HP-UX Workload Manager User's Guide

Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H514
Figure H-5 illustrates the single-value mode of operation for wlmsend. In
this mode, wlmsend is repeatedly invoked with a single metric value.
However, it is invoked in a loop in a shell script or a perl program that
updates that metric value.
Figure H-5 wlmsend: single-value mode (wlmsend metric value)
In this example, the setup is the same as in the previous example. Thus,
in the configuration file, we define an slo structure to keep the metric
job_time under 2.0, and we set up wlmrcvdc to receive the job_time
metric values from wlmsend:
# Set up the SLO
slo data_cruncher {
pri = 3;
mincpu = 15;
maxcpu = 25;
entity = PRM group crunch;
goal = metric job_time < 2.0;
}
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
Next, we set up wlmsend in a loop in either a shell script or a perl
program. The function get_value provides the metrics to feed wlmsend.
We add a sleep command to slow down how often metrics are retrieved.
For a shell script, that loop might look like the following:
while (true)
do
value = ‘get_value‘
wlmsend feeds single value
to the rendezvous point
wlmrcvdc collects the
data and forwards it to wlmd
Rendezvous
point
wlmsend wlmrcvdc wlmd
value