tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Carrillo <tom...@daydream.stanford.edu>
Subject Re: Shell script to check if Tomcat is running?
Date Wed, 03 Dec 2003 07:18:37 GMT
This is for unix/linux.

Oscar

On Tue, 2 Dec 2003 irubenis@lanet.lv wrote:

> Does anybody has script also for unix systems like REDHAT linux?
> This looks likes for windows!
> 
> > 2 really simple ways
> > 
> > 
> > -----------------------------
> > # Assume tomcat is the only java process
> > COWBELL=`ps -ef | grep java| grep -v grep | wc -l`
> > if [ $COWBELL > 0 ]; then
> >    echo "Woohoo - the process is there";
> > fi
> > -----------------------------
> > 
> > OR
> > 
> > -----------------------------
> > # Assume glodenfile should be result from url below
> > rm dest_file.html
> > wget http://more/cowbell.txt --output-document=dest_file.html
> > COWBELL=`diff dest_file.html goldenfile.html  | wc -l`
> > if [ $COWBELL == 0 ]; then
> >    echo "Woohoo - the site is up (and not hacked)";
> > else
> >    echo "The downloaded page is diff from the golden file"
> > fi
> > -----------------------------
> > 
> > 
> > -Tim
> > 
> > Tom Ly wrote:
> > 
> > > I plan on using cron to automatically run a script to check if Tomcat is
> > running.  How would I write one?
> > >  
> > > -Tom
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message