HP-UX Workload Manager User's Guide
WLM quick start: the essentials for using WLM
WLM shown in action
Chapter 268
Step 2. Start WLM with an example configuration file:
# /opt/wlm/bin/wlmd -a /opt/wlm/examples/userguide/multiple_groups.wlm
The example configuration file is multiple_groups.wlm, which does the
following:
1. Defines two workload groups: g2 and g3.
2. Assigns applications (in this case, perl programs) to the groups.
(With shell/perl programs, give the full path of the shell or perl
followed by the name of the program.) The two programs loop2.pl and
loop3.pl are copies of loop.pl. The loop.pl script (available in
/opt/wlm/examples/userguide/) runs an infinite outer loop, counts in
the inner loop, and shows the time spent counting:
#!/opt/perl/bin/perl -w
#
# Name:
# loop.pl
#
# Version information:
#
# $Revision: 1.4 $
$maxcount = 3000000;
# Here is an infinite loop
while (1) {
$count = 1;
$start = time();
while ($count <= $maxcount) {
$count++;
}
$end = time();
printf (“loop.pl: Elapsed time=%.2f seconds\n”, $end-$start);
}
3. Sets bounds on CPU usage. The number of CPU shares for the
workload groups can never go below the gmincpu or above the
gmaxcpu values. These values take precedence over the minimum
and maximum values that you can optionally set in the slo
structures.
4. Defines an SLO (service-level objective) for g2. The SLO is priority 1
and requests 15 CPU shares for g2.