Re: Log rotation and logrotate

From: Derek Milliner <derek.milliner@dont-contact.us>
Date: Mon, 10 Jul 2000 09:31:35 +0100

I use a script which periodically (via cron) checks the size of the log
file. If it's bigger than 'X' then I simply call a squid -k rotate (why
reinvent the wheel?).

>At 08:58 10/07/00, you wrote:
>Hi,
>
>the FAQ says "the correct way to rotate logs is using squid -k
>rotate". My squid isn't that busy, so I don't need to rotate logs on a
>time based schedule. I'd like to use logrotate to have the logs
>rotated when they exceed a certain size.
>
>I'd like to know why using squid -k rotate is the "correct" way, and
>if there is any chance to tell a running squid that somebody else has
>taken care of rotating the logs and to tell that squid to start using
>new log files.

It's the 'correct' way because that way you know the correct signal is
being sent to squid. According to the squid.conf the normal signal is USR1,
but this sometimes is used for something else (e.g. Linux with async I/O).
Presumably if you're confident that it is using USR1, you can do your own
version of the rotate and then send USR1 to tell squid to use the new log file.

Regards,

Derek.

#==---------------------------------------------==#
      Derek Milliner AnIX Computers Limited
      derek.milliner@anix.co.uk
      http://www.anix.co.uk
Received on Mon Jul 10 2000 - 02:34:49 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:23 MST