Checking…. tomcat alive and kicking…..

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.

Advertisements

2 thoughts on “Checking…. tomcat alive and kicking…..

  1. silvia says:

    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” 😛 n found out what i needed!!!

  2. HumaN says:

    welcome abba.. sorry amma 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s