A simple bash script to kill WebSphere processes
#!/bin/bash
export thePids=`ps -ef | grep -e '-Duser.install.root[^ ]*' | grep -v grep | awk -F" " '{print $2}'`
if [[ -z "${thePids}" ]]; then
echo "No WAS process found!"
exit 1
fi
for thePid in $thePids
do
echo "killing the pid=[${thePid}] using kill -9 ${thePid}"
kill -9 ${thePid}
done;