RE: How to detect down of tomcat.

2011-03-25 Thread Jorge Infante Osorio
Thanks a lot Darryl. Jorge. De: Darryl Lewis [mailto:darryl.le...@unsw.edu.au] Enviado el: martes, 22 de marzo de 2011 4:05 Para: Jorge Infante Osorio; Tomcat Users List Asunto: Re: How to detect down of tomcat. This needs to be run as root Put it in a cron job to fire every minute #!/bin/sh

Re: How to detect down of tomcat.

2011-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hide, On 3/19/2011 10:38 PM, Hide wrote: > How to detect down of tomcat. Note that the responses you've been getting are only testing for the Tomcat process still running in some way. There are probably a lot of scenarios where you consider Tomcat "d

Re: How to detect down of tomcat.

2011-03-22 Thread Darryl Lewis
This needs to be run as root Put it in a cron job to fire every minute #!/bin/sh DOWN=0 read DOWN att.txt mail -s "$subject" "$addr" -- -fno-reply@yourdomain< att.txt fi DOWN=0 fi if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ] then NOW=`date` subject="tomcat down $NOW" addre

RE: How to detect down of tomcat.

2011-03-21 Thread Jorge Infante Osorio
an you share it? Thanks, Jorge. -Mensaje original- De: Darryl Lewis [mailto:darryl.le...@unsw.edu.au] Enviado el: sábado, 19 de marzo de 2011 23:17 Para: Tomcat Users List Asunto: Re: How to detect down of tomcat. Opps...typo #!/bin/sh if [ `ps -ef|grep tomcat|grep -v gr

Re: How to detect down of tomcat.

2011-03-20 Thread Mark Thomas
On 20/03/2011 10:22, Francis GALIEGUE wrote: > Not really, no. If, for instance, you don't have a minimal security > configuration, you can put in your code, say, System.exit(0), and > Tomcat will die without notice. Wrong. If you do that you will see a normal shut-down sequence. Mark --

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
Sunday, March 20, 2011 8:20 PM Subject: Re: How to detect down of tomcat. The other problem will be that tomcat is running, but the application is not responding. There may be nothing in the logs for this, and this is one of my most common issues. In this case, I use some custom scripts to simul

Re: How to detect down of tomcat.

2011-03-20 Thread Hide
. - Original Message - From: "Darryl Lewis" To: "Tomcat Users List" ; "Tomcat Users List" Sent: Sunday, March 20, 2011 8:20 PM Subject: Re: How to detect down of tomcat. The other problem will be that tomcat is running, but the application is not responding. Th

Re: How to detect down of tomcat.

2011-03-20 Thread Kees Jan Koster
> Your script looks like very useful. >> But in my case, tomcat is running on Microsoft Windows. >> I am looking for a method to detect the down of tomcat by log file. >> - Original Message - >> From: "Darryl Lewis" >> To: "Tomcat Users List&qu

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
: "Darryl Lewis" To: "Tomcat Users List" Sent: Sunday, March 20, 2011 12:17 PM Subject: Re: How to detect down of tomcat. You could write something similar using windows powershell. Do you have that installed on your server? On 20/03/11 2:14 PM, "Hide" wrote: Hi

Re: How to detect down of tomcat.

2011-03-20 Thread Darryl Lewis
> - Original Message - From: "Darryl Lewis" > > To: "Tomcat Users List" > Sent: Sunday, March 20, 2011 12:17 PM > Subject: Re: How to detect down of tomcat. > > > You could write something similar using windows powershell. Do you have > that install

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
l. But in my case, tomcat is running on Microsoft Windows. I am looking for a method to detect the down of tomcat by log file. - Original Message - From: "Darryl Lewis" To: "Tomcat Users List" Sent: Sunday, March 20, 2011 12:00 PM Subject: Re: How to detect down of t

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
unday, March 20, 2011 12:00 PM Subject: Re: How to detect down of tomcat. Put this in a cronjob to fire every minute #!/bin/sh if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ] then subject=`tomcat down; date` address="m...@domain.com" ps -ef>att.txt mail -s "$subject"

Re: How to detect down of tomcat.

2011-03-20 Thread Francis GALIEGUE
On Sun, Mar 20, 2011 at 05:05, Hide wrote: [...] > > My explanation seems to have been bad. > I explain it a little more. > > It is a method to output the information of the abnormal termination in > "catalina.log" that I want to know. > Would you teach it if you know some method? > Not really, n

Re: How to detect down of tomcat.

2011-03-19 Thread Hide
al Message - From: "Darryl Lewis" To: "Tomcat Users List" Sent: Sunday, March 20, 2011 12:17 PM Subject: Re: How to detect down of tomcat. You could write something similar using windows powershell. Do you have that installed on your server? On 20/03/11 2:14 PM, "

RE: How to detect down of tomcat.

2011-03-19 Thread Martin Gainty
esponsabilité pour le contenu fourni. > From: darryl.le...@unsw.edu.au > To: users@tomcat.apache.org > Date: Sun, 20 Mar 2011 14:00:49 +1100 > Subject: Re: How to detect down of tomcat. > > Put this in a cronjob to fire every minute > > #!/bin/sh > if [ `ps -ef|gre

Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
r a method to detect the down of tomcat by log file. - Original Message - From: "Darryl Lewis" To: "Tomcat Users List" Sent: Sunday, March 20, 2011 12:00 PM Subject: Re: How to detect down of tomcat. Put this in a cronjob to fire every minute #!/bin/sh if [ `ps -

Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
Opps...typo #!/bin/sh if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ] then NOW=`date` subject="tomcat down $NOW" address="m...@domain.com" ps -ef>att.txt mail -s "$subject" "$addr" -- -fno-reply@yourdomain< att.txt fi On 20/03/11 2:00 PM, "Darryl" wrote: Put this in a cronjob

Re: How to detect down of tomcat.

2011-03-19 Thread Hide
Sent: Sunday, March 20, 2011 12:00 PM Subject: Re: How to detect down of tomcat. Put this in a cronjob to fire every minute #!/bin/sh if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ] then subject=`tomcat down; date` address="m...@domain.com" ps -ef>att.txt mail -s

Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
Put this in a cronjob to fire every minute #!/bin/sh if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ] then subject=`tomcat down; date` address="m...@domain.com" ps -ef>att.txt mail -s "$subject" "$addr" -- -fno-reply@yourdomain< att.txt fi Fill in the address with your email addres