Using HP-UX Workload Manager: A quick reference

16
place processes that you might otherwise have to move manually by using the prmmove or prmrun
commands.
In the prm structure that follows, the procmap statement causes the PRM application manager to
place in the sales group any processes gathered by the ps command that have PIDs matching the
application pid_app. The application manager places in the mrktg group any processes gathered
by the external script pidsbyapp that have PIDs matching the application mrketpid_app.
prm {
groups = OTHERS : 1,
sales : 2,
mrktg : 3;
procmap = sales :
/bin/env /UNIX95= /bin/ps -C pid_app -o pid=,
mrktg : /scratch/pidsbyapp mrketpid_app;
}
As noted previously, if application, user, Unix group, or compartment records are also specified in the
prm structure, the process placement specified by a process map has precedence over the placement
specified by the other records. In other words, if a PID gathered by the process map matches an
application, user, Unix group, or compartment record, the process map determines the placement of
the identified process.
prmrun: Starting a process in a workload group
You can explicitly start processes in particular workload groups using the prmrun command. Given
the groups and users statements shownin User records: Workload separation by process owner,
user larry running the following command would cause his job to be run in group testers:
# my_really_big_job &
However, user larry also has permission to run processes in the group surfers. Thus, larry can use
the following prmrun command to run his proces in the group surfers:
# /opt/prm/bin/prmrun -g surfers my_really_big_job &
prmmove: Moving an existing process to a workload group
Use the prmmove command to move existing processes to a different workload group. If larry from
the previous example has a job running with PID 4065 in the group testers, he could move that
process to group surfers by running the command:
# /opt/prm/bin/prmmove surfers -p 4065
Default: Inheriting workload group of parent process
If a process is not named in an apps statement, a users statement, a uxgrp statement, or an
scomp statement, or if it has not been identified by a procmap statement, or if it has not been started
with prmrun or moved with prmmove, it starts and runs in the same group as its parent process. So
for a setup like the following, if user jdoe has an interactive shell running in group mygrp, any
process spawned by that shell process would also run in mygrp because its parent process was there:
prm {
groups = OTHERS : 1,
mygrp : 2;
}
Simple inheritance is the mechanism that determines where most processes run, especially for short-
lived processes.