Using HP-UX Workload Manager: A quick reference

7
In addition, you can use the wlminfo command, which shows CPU Shares and utilization (CPU
Util) for each workload group, and beginning with WLM A.03.02, the command also shows
memory utilization (because memory records are not being managed for any of the groups in this
example, a “-“ is displayed in the Mem Shares and Mem Util columns):
# /opt/wlm/bin/wlminfo group
Thu Aug 29 08:36:38 2006
Workload Group PRMID CPU Shares CPU Util Mem Shares Mem Util State
OTHERS 1 65.00 0.00 - - ON
g2 2 15.00 0.00 - - ON
g3 3 20.00 0.00 - - ON
5. Start the scripts referenced in the configuration file, as explained in the following:
a. WLM checks the files /etc/shells and /opt/prm/shells to ensure one of them lists each shell
or interpreter, including perl, used in a script. If the shell or interpreter is not in either of those
files, WLM ignores its application record (the workload group assignment in an apps
statement).
Add the following line to the file /opt/prm/shells so that the application manager can
correctly assign the perl programs to workload groups:
/opt/perl/bin/perl
b. Start the two scripts loop2.pl and loop3.pl. The following scripts produce output, so you
might want to start them in a new window.
# /opt/wlm/examples/userguide/loop2.pl &
# /opt/wlm/examples/userguide/loop3.pl &
These scripts start in the PRM_SYS group because you started them as the root user.
However, the application manager soon moves them (within 30 seconds) to their assigned
groups, g2 and g3. After waiting 30 seconds, run the following ps command to see that the
processes have been moved to their assigned workload groups:
# ps -efP | grep loop
The output will include the following items (column headings are included for convenience):
PRMID PID TTY TIME COMMAND
g3 6463 ttyp1 1:42 loop3.pl
g2 6462 ttyp1 1:21 loop2.pl
6. Manage workload group assignments:
a. Start a process in the group g2:
# /opt/prm/bin/prmrun -g g2 \
/opt/wlm/examples/userguide/loop.pl
b. Verify that loop.pl is in g2 with ps:
# ps -efP | grep loop
The output will confirm the group assignment:
g2 6793 ttyp1 0:02 loop.pl