Checking…. tomcat alive and kicking…..

Sunday, 14th January, 2007 at 4:56 am (Technical)

Few dayz ago for one of my work on the freeBSD server, i wanted to check if the tomcat server was running. As in a live server, if the server is not running, whats the point of keeping the server? So i wanted to make sure if the tomcat is running from command-line and run if it is dead. But figuring out the aliveness of the tomcat was the hard part, rest was the shell script. One of my friend said, it will be hard one cause tomcat runs on JVM. I thought there much be a way, so i kept searching. At last, i got a widget which works something like a remote controller for the tomcat server.

Which can be found with name: Tomcat Collar 1.1

But the magic line was this one:
ps -w -A -w |grep "org.apache.catalina.startup.Bootstrap start"

if this returns you something, that means tomcat is alive and …. :-)
i guess this might save someones wild searching time, like i did for several days.

2 Comments

  1. silvia said,

    thanx BOSS!!!! i m now working on that stupid “thankyou” thingy.. n i needed to know if the tomcat was running…then i remembered u wrote something like this….then i googled your “THP” :P n found out what i needed!!!

  2. HumaN said,

    welcome abba.. sorry amma :D

Post a Comment