tomcat status from shell

ahmettaha

Registered
Hello,
How can I check if tomcat is running from shell. The only scripts that I found are for a different version of ps, so I couldnt use them.


thanks
 
Does the following (or a close variation of it):
if [ "x`ps -aef | egrep [t]omcat`" == "x" ]; then
echo "tomcat not running"
else
echo "tomcat running"
fi

work for you?
 
Back
Top