Re: [squid-users] Apparently, no rotation on .logs

From: Michael Wray <mwray@dont-contact.us>
Date: Tue, 1 Mar 2005 08:37:47 -0600

The best answer to this situation would be to 'trunc -s 0 filename' then
'killall -30 squid ' . What this does is truncate the files to size 0, and
forces squid to close and reopen the logfiles. Just removing the files will
cause squid to crash unless you are positive squid has write permissions on
the directory the logfile is in to recreate said logfile. (I've always had
to create by hand even if squid did have permissions.)
 If you want squid to rotate files, you need a logfile_rotate parameter in
your conf file that is not set to 0. (Set to # of logfiles to keep...squid
defaults to rotate once a day.)
IF you set the logfile_rotate option to 0 you can use a program like newsyslog
or logrotate to rotate the logfiles as long as you send a signal 30 (which is
-k) right after rotation to make squid close and reopen it's logfiles,
otherwise it will eventually cause squid to die due to errors writing to the
logfiles.

Most people need access.log so they can get stats on where people are going,
topsites, etc....

On Monday 28 February 2005 1:35 pm, Eric Geater 02/11/05 wrote:

> Howdy, everyone. Back in October 2003, we set up a Squid 2.4(?) proxy,
> and thought it was quite nice. It turns out, however, that we never set
> up a rule for logging and log rotation. Our "store.log" file is
> gargantuan, and darn near filling up the HD space we have left.
>
> I want to gamble, and say that we don't need the information in either
> access.log or store.log. If I were to close out squid this afternoon,
> and I were to delete those files, would I cause any significant problems
> to the system?
>
> I don't think I have enough time (or swap space) to do the "kill -USR1"
> solution, and nothing happened when I entered "squid -k rotate", so I'd
> just like to kill the files altogether and start over. Will this hurt?
>
> Thanks
>
> Eric Geater
> egeater at mscoinc dot com
Received on Tue Mar 01 2005 - 07:37:45 MST

This archive was generated by hypermail pre-2.1.9 : Fri Apr 01 2005 - 12:00:01 MST