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
-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
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
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
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
--
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
.
- 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
> 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
: "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
> - 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
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
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"
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
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, "
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
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 -
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
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
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
19 matches
Mail list logo