Programming__WebObjects-Web Applications-Deployment-Killing WOA Processes
This is one of the most vexing question. How to kill a run away WO application? The ps command does not give you any information as it list the process as java.
Try to use lsof. You need to run it with admin privileges so the command is
Alternatively you can have a script:
You will also have to do a sudo for the script to run.
For those stuck with the CLOSEWAIT problems try this:
Alternatively you can have a script:
run it by doing:
where xxxx is the first port and yyyy the last port
how about (pref. inside a script):
ps aux | grep java | grep <appName> | grep v grep | awk '{ print"kill 9 "$2 }' | sh
Mike Schrag
I just use
which will show the full commandline. You can see the app name from this view.
Fabian Peters
On FreeBSD one needs to set
in /etc/sysctl to reveal the full command line with ps auxww. To set it immediately:
Alternatively, one can use Johan's script below.
Johan Henselmans
I have written a small script that uses lsof to find the process by looking at some specific file that is opened, the returned processes can then be used to kill the process
#!/bin/sh
if [ $# = 0 ]; then
{panel}
echo ""
echo " usage: $0 javaname(s)"
echo " The current processes that containt javaname will be displayed"
echo " eg: $0 JavaMonitor.woa"
echo ""
exit 1
{panel}
fi
OS=`uname -s`
# echo $OS
case ${OS} in
'FreeBSD')
LSOF=/usr/local/sbin/lsof
;;
'Linux')
LSOF=/usr/sbin/lsof
;;
'Darwin')
LSOF=/usr/sbin/lsof
;;
*)
echo "no lsof command available on this OS!";
exit 1
;;
esac
for i in $*
do
${LSOF} -c java | grep -i $i | awk '{print $2}' | sort -u;
done
Category:WebObjects