>
> Peter Olsson <pol@leissner.se> writes:
> >
> > I can't find anything about this in the faq. What is the best way
> > to truncate the logs to zero size without disturbing operation
> > of squid?
>
> Rename the logs and then kill -USR1 `cat cached.pid`.
>
> /assar
I had a little script that runs via cron each day:
#!/usr/local/bin/bash
PATH=/:/usr/bin
export PATH
kill -SIGUSR1 'cat /web/cache/squid/squid.pid'
and have the following in squid.conf
# TAG: logfile_rotate #
# Specifies the number of logfile rotations to make upon receiving
# a USR1 signal. The default is 10, which will rotate with
# extensions 0 through 9. Setting logfile_rotate to 0 will
# disable the rotation, but the logfiles are still closed and
# re-opened. This will enable you to rename the logfiles yourself
# just before sending a USR1 signal to the cached process.
#
#logfile_rotate 10
and:
# TAG: pid_filename
# A pathname to write the process-id to. There is no default.
#
pid_filename /web/cache/squid/squid.pid
John
-- John Heaton Phone: (+44 161)/(0161) 275-6011 Manchester Computing FAX: (+44 161)/(0161) 275-6040 The University of Manchester Oxford Road, Manchester Email: John@MCC.ac.uk, g1yyh@amsat.org M13-9PL, UK WWW: http://www.mcc.ac.uk/John/Received on Tue Sep 24 1996 - 08:43:59 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:03 MST