HP-UX Workload Manager User's Guide
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H496
# 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;
}
On the command line that follows, some program is updating logfile.
With the tail command, wlmsend gets the latest updates to the file and
sends them to a rendezvous point for wlmrcvdc to collect:
# tail -f logfile | /opt/wlm/bin/wlmsend job_time
This rendezvous point is created by wlmrcvdc.
For background information on how wlmsend and wlmrcvdc work
together to get your data to WLM, as well as a warning about I/O
buffering, see “Sending data with wlmsend and wlmrcvdc: How it works”
on page 509.
Sending data from a shell script
If you have data you want to send to WLM from a shell script, use
wlmsend in the shell script and an associated wlmrcvdc in your
configuration file. This method of sending data works for a single metric
value that is specified as an argument to wlmsend or for a stream of
metric values that is piped to wlmsend, as shown in the following
example.
In this example, start in the configuration file by defining an slo
structure to keep the metric job_time under 2.0, and then 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;