HP StorageWorks HSG80 ACS Solution Software V8.8 for Tru64 UNIX Installation and Configuration Guide (AA-RV1VA-TE, March 2005)

SWCC Agent in TruCluster Environment
257HSG80 ACS Solution Software V8.8 for Tru64 UNIX Installation and Configuration Guide
# Kill (-9) a given process using brutal force
#
zapdaemon () {
for i in ${1}
do
kill -9 `ps -o pid,command -A | grep ${i} | grep -v grep | awk
'{print $1}'`
checkdaemon ${i}
if [ $? -ne 0 ]; then
echo "Retrying to kill process ${i} "
kill -9 `ps -o pid,command -A | grep ${i} | \
grep -v grep | awk '{print $1}'`
checkdaemon ${i}
if [ $? -ne 0 ]; then
echo "Process ${i} (PID: `ps -o pid,command -A | grep ${i} |
grep -v
grep | awk '{print $1}'`) \
seems to be stubborn, please investigate"
exit 2
fi
fi
done
}
#
# If failure, post EVM event
#
postevent () {
${EVMPOST} "*URGENT* CAA Script Failure, Cannot ${2} ${1} .
Aborting ${2} "
echo "Cannot ${2} ${1} . Aborting ${2} at `date`." >> ${LOG}
echo "Cannot ${2} ${1} . Aborting ${2} at `date`." | \
/usr/bin/mailx -s "*URGENT* CAA Script Failure" $CAA_ADMIN
return 2
}
#