RE: [us...@httpd] How to detect a non-graceful restart of Apache

2009-06-19 Thread Boyle Owen
 -Original Message-
 From: SAILESH KRISHNAMURTI, BLOOMBERG/ 731 LEXIN 
 [mailto:skrishnam...@bloomberg.net] 
 Sent: Thursday, June 18, 2009 3:42 PM
 To: USERS@httpd.apache.org
 Subject: [us...@httpd] How to detect a non-graceful restart of Apache
 
 Hi, I have a requirement wherin application owners would like 
 to be notified if apache is restarted non-gracefully, since 
 there might be impact to user sessions etc... Is there any 
 way to detect and report this, hopefully without compiling 
 additional modules? thanks

The simplest way is probably to monitor the error_log (eg, with a
perl-script running under cron). If there is a stop; you get a SIGTERM
in the log. For a restart; there is a SIGHUP. For a graceful; no
signals, just a message.

Alternatively, if you have mod_server_status, you could poll it. The
server uptime is reset to zero if there is a stop/start or restart, but
keeps ticking if there is a graceful.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. If you receive this message in 
error, please notify the sender urgently and then immediately delete the 
message and any copies of it from your system. Please also immediately destroy 
any hardcopies of the message. 
The sender's company reserves the right to monitor all e-mail communications 
through their networks.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] How to detect a non-graceful restart of Apache

2009-06-18 Thread SAILESH KRISHNAMURTI, BLOOMBERG/ 731 LEXIN
Hi, I have a requirement wherin application owners would like to be notified if 
apache is restarted non-gracefully, since there might be impact to user 
sessions etc... Is there any way to detect and report this, hopefully without 
compiling additional modules? thanks