> -----Original Message----- > From: SAILESH KRISHNAMURTI, BLOOMBERG/ 731 LEXIN > [mailto:skrishnamur1@xxxxxxxxxxxxx] > Sent: Thursday, June 18, 2009 3:42 PM > To: USERS@xxxxxxxxxxxxxxxx > Subject: 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-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx