Smitty,
I would be afraid to let a script determine what a runaway process is but I do have a script to kill a process by name
#Script which will kill all processes with a given name
#
clear
echo "\n\n"
echo "Please, enter the name of the process you want to kill. \c";
read PROC_NAME
#
PID=`ps -ef | sort +6| grep $PROC_NAME|grep -v grep |awk '{print $2}'`
if [ "$PID" ]
then
`kill -9 $PID`
else
echo "I couldn't find that process name."
fi
Hope that this helps!