This is definitely off topic for this list, however...

I'm not exactly sure what you're asking here, but if what you're asking is
"how do I rotate logfiles without doing a hard stop/start cycle?", then
the answer is (from the command line...) rename the open logfiles, then
send the server either a SIGHUP or a SIGUSR1, which will cause it to
reopen its logfiles.

SIGHUP does it "forcefully" (existing requests will aborted), while
SIGUSR1 does it "gracefully", allowing each child server currently
handling requests to complete the request before restarting it.

If you use the 'apachectl' control script included in the apache
distribution, these options correspond to 'apachectl restart' and
'apachectl graceful', respectively (although, if I remember right, the
'graceful' option wasn't added until around release 1.3.0).

So, something like this is what you want to do:

  root# cd /usr/local/apache
  root# mv logs/access_log logs/access_log.21-feb-2001
  root# mv logs/error_log  logs/error_log.21-feb-2001
  root# ./apachectl graceful

At this point, new logs will be opened in the logs directory, and you can
safely do whatever (gzip, archive, analyze, etc...) you want with the
rotated logs.

HTH,
<Steve>

On Thu, 22 Feb 2001, Terry Newnham wrote:

> I've found out how to edit httpd.conf so that it will rotate the error
> and access logs. But you have to restart apache to read that which I'd
> rather not do. Is there a command-line use or the rotatelogs by means of
> which you can rotate the logs on the fly ?

=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci                                       [EMAIL PROTECTED] |
Logical Choice Software                          http://logsoft.com/ |

Reply via email to