# tomcat status from shell



## ahmettaha (Nov 10, 2006)

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


----------



## egportal2002 (Nov 17, 2006)

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?


----------

