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 Jorge Infante Osorio
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 grep|wc -l` -lt 1

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 status.txt if [ $DOWN -eq 1 ] then if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -gt 0 ] then NOW=`date` subject=tomcat recovered $NOW address=m...@domain.com ps -ef|grep

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

Re: How to detect down of tomcat.

2011-03-20 Thread Francis GALIEGUE
On Sun, Mar 20, 2011 at 05:05, Hide hide3...@ob4.aitai.ne.jp 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?

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
users@tomcat.apache.org 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 -efatt.txt mail -s

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
, 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 hide3...@ob4.aitai.ne.jp wrote: Hi, Darryl. Thanks for your advice. Your script looks like very useful

Re: How to detect down of tomcat.

2011-03-20 Thread Darryl Lewis
List users@tomcat.apache.org 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 hide3...@ob4.aitai.ne.jp wrote: Hi, Darryl

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
...@unsw.edu.au To: Tomcat Users List users@tomcat.apache.org 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 hide3...@ob4.aitai.ne.jp wrote

Re: How to detect down of tomcat.

2011-03-20 Thread Kees Jan Koster
: 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 -efatt.txt mail -s $subject $addr -- -fno-reply@yourdomain att.txt fi Fill in the address

Re: How to detect down of tomcat.

2011-03-20 Thread Hide
. - Original Message - From: Darryl Lewis darryl.le...@unsw.edu.au To: Tomcat Users List users@tomcat.apache.org; Tomcat Users List users@tomcat.apache.org 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

Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
users@tomcat.apache.org 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. There may be nothing in the logs for this, and this is one of my most common issues. In this case, I use

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-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 -efatt.txt mail -s $subject $addr -- -fno-reply@yourdomain att.txt fi Fill in the address with your email address, and

Re: How to detect down of tomcat.

2011-03-19 Thread Hide
users@tomcat.apache.org 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 -efatt.txt mail -s

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 -efatt.txt mail -s $subject $addr -- -fno-reply@yourdomain att.txt fi On 20/03/11 2:00 PM, Darryl darryl.le...@unsw.edu.au wrote: Put this

Re: How to detect down of tomcat.

2011-03-19 Thread Darryl Lewis
am looking for a method to detect the down of tomcat by log file. - Original Message - From: Darryl Lewis darryl.le...@unsw.edu.au To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, March 20, 2011 12:00 PM Subject: Re: How to detect down of tomcat. Put this in a cronjob to fire

RE: How to detect down of tomcat.

2011-03-19 Thread Martin Gainty
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|grep tomcat|grep -v grep|wc -l` -lt 1 ] then subject=`tomcat down

Re: How to detect down of tomcat.

2011-03-19 Thread Hide
- From: Darryl Lewis darryl.le...@unsw.edu.au To: Tomcat Users List users@tomcat.apache.org 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