Re: Rotating logfiles

From: Malcolm B.J. Garbutt <mgarbutt@dont-contact.us>
Date: Fri, 4 Jul 1997 10:01:38 +1000 (EST)

On Thu, 3 Jul 1997, John E. Kozitzki wrote:

> I have seen alot of discussion about rotating logfiles lately.
> One command seems to come up:
>
> kill -USR1 `cat /usr/local/squid/logs/squid.pid`
>
> What does this command actually do?
Rotate the logs files ?
cache.log, access.log, and the cache_swap_log.

> I have run it on our squid and the results were as follows:
>
> 1. Created a file in the cache subdirectory called log-last-clean with 0
> bytes.
This means it didn't need to remove any thing from the cache_swap_log
(your machines doing it on the run), you will notice in you
/usr/local/squid/logs/ dir that there will be the cache.log and
access.log with .0 to .WHAT_EVER_YOU_SPECIFIED_IN_THE_SQUID.CONF
These files ending in numbers can be deleted if you like, or analysed and
then deleted.

> 2. Added lines to cache.log stating that squid is rotating log files.
Yeah, thats what the cache.log is for, debugging as well.

>
> This takes about 4 seconds of writing and it then completes.
> The only thing that bothers me is that I see no result of log files being
> rotated except for the log-last-clean file.
> Is there something else that I am missing?
See Above there should be .0 files in the logs directory

>
> Currently, I clean the logs with a script similar to the following:
>
> mail -s user "cache.log" < cache.log; cp /dev/null cache.log
> mail -s user "store.log" < store.log; cp /dev/null store.log
> mail -s user "access.log" < access.log; cp /dev/null access.log
yep sure can.
Why don't you change the last bit to rm /usr/local/squid/logs/*.0
It would be safer.

>
> Could this cause me problems?
>
> Thanx
>
> John Kozitzki
> Information Systems Manager
> B&W Co-op, Incorporated (http://www.bwcoop.com)
> RURAL-NET of Central Michigan (http://www.rural-net.com)
> B&W Farm Center / Case IH (http://www.bwcaseih.com)
> (517)842-3104 ext. 207
> johnk@rural-net.com
>

_________________________________________________________
Malcolm Garbutt
Network Operations-
MILDURA.NET MURRAY.NET

Office Ph. 03 50 212 991 Office Fax 03 50 212 932
Emergency Ph. 018 596 150

            .....Bringing the World to You......
_________________________________________________________
Received on Thu Jul 03 1997 - 16:25:28 MDT

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