HP Process Resource Manager User's Guide

Using PRM with Serviceguard
Appendix E 251
Here is the example control function:
# START OF CUSTOMER DEFINED FUNCTIONS
function customer_defined_run_cmds
{
# customer defined run commands.
UNAME=`uname -n`
# check to make sure prm is installed
if [ -f /opt/prm/bin/prmconfig ]
then
# check that our prm config file is there; if not, create it
if [ ! -f /etc/opt/prm/conf/Serviceguard ]
then
cat > /etc/opt/prm/conf/Serviceguard << EOF1
#
# sample Serviceguard PRM config file for a university
#
# groups
OTHERS:1:10::
math_dept:2:40::
computer_dept:3:50::
# users
root::::PRM_SYS
# application records
/opt/math/bin/tool::::math_dept,num_cruncher,print_answer
/usr/local/games/tetris::::computer_dept
EOF1
fi
# is PRM turned on?
/opt/prm/bin/prmconfig 2> /dev/null > /dev/null
if [ “$?” -eq “1” ]
then
# need to initialize PRM
/opt/prm/bin/prmconfig -ie -f /etc/opt/prm/conf/Serviceguard
if [ “$?” -eq “1” ]
then