Here is a script I use prior to getting the backup process (I split my mirrored disks so I only need a 5 minute window of no users).
I first kill -15 to give the application a chance to recover itself, then I do a kill -9 for those that didn't die nicely. I also take the oppurtunity to delete any run away -ksh sessions.
I send the output of this script to a text file which I can review if need be.
HTH
-- Rod Hills
#!/usr/bin/ksh
# -- kick off production users prior to backup
echo "\07Production AVANTE backup process starts in 2 minutes\07" | /usr/sbin/wall
echo "System will be unavailable from 9:05 to 10:00 tonight" | /usr/sbin/wall
sleep 60
echo "\07Production AVANTE coming down in 60 seconds...\07" | /usr/sbin/wall
sleep 30
echo "\07Production AVANTE coming down in 30 seconds...\07" | /usr/sbin/wall
sleep 30
echo "\07Production AVANTE Halting !! Come back in 10 min\07" | /usr/sbin/wall
echo "Kill Soft Pass ..."
ps -ef | awk '$8=="UV"{print $0 ; system("kill -15 " $2)}'
sleep 30
echo "Kill Hard Pass ..."
ps -ef | awk '$8=="UV"{print $0 ; system("kill -9 " $2)}'
sleep 15
echo "Kill run away ksh Pass ..."
ps -ef | awk '$8=="-ksh" && $3=="1"{print $0 ; system("kill -9 " $2)}'
sleep 15
echo "Kill Proof ..."
ps -ef | awk '$8=="UV"{print $0}'
There be dragons...