httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] How to detect a non-graceful restart of Apache
Date Fri, 19 Jun 2009 07:43:50 GMT
> -----Original Message-----
> [] 
> Sent: Thursday, June 18, 2009 3:42 PM
> To:
> Subject: [users@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.

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

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message