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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to