K. Deepak,
THis may be better to handle with cron. Have 2 scripts, one that runs on
the First day of the month at 12:15 AM.
Have it:
stop squid.
Create new monthly directory: /squid_records/May-00
move access.log to the /squid_records/May-00/baseline.
restart squid
Then hourly (or as needed) with cron,
Check to see if access.log is too big. If so,
Stop squid,
Check for number of archive files.
Too many? Ditch one
Move access.log to the monthly diectory as
/squid_records/May-00/access.log.'nextnumber.
restart squid.
Better yet, just run calamaris before deleting anything, save the resultant
HTML in safe place!
Then, point a web browser at /squid_records so you can drill down as needed!
JDW
> -----Original Message-----
> From: K.DEEPAK [SMTP:kdeepak@india.adventnet.com]
> Sent: Monday, April 24, 2000 10:16 AM
> To: Henrik Nordstrom
> Cc: Squid Users Mailing List
> Subject: Re: log file question
>
> Hai Henrick,
>
> Thanks for the prompt reply. But i have a doubt
> on
> this. I have installed squid via RedHat RPM only. My squid rpm is
> squid-1.1.22-2.i386.rpm. But , as said by you , i can't see any squid file
> in /etc/logrotate directory. I checked even the /etc/squid.conf file also.
> But, it just only says how many rotations of log files i can keep. But , i
> want the squid to do something like this:
>
> 1. If the size of the log file exceeds 20MB it should rename in the format
> mentioned below.
> 2. or if the log file is older than one month it should get renamed.
> 3. in any case the log rotations should not be more than 10 times, when it
> reaches the 10th logrotate, the first one should get chucked out. i.e
> first
> in first out.
>
> I hope that i have made myself clear........
>
>
> Please help me.......
>
> Eagerly waiting for ur reply.
>
>
> With regards
>
> K.Deepak
>
>
> Henrik Nordstrom wrote:
>
> > K.DEEPAK wrote:
> >
> > > In my office i have installed squid ( In RedHat linux 5.2)
> > > and it is working fine. Since more than 100 users use squid, my log
> > > files grows enormously. Whether it is possible to set any parameter
> in
> > > /etc/squid.conf file so that as any of the log file size go beyond
> 20MB
> > > , the squid system automatically renames the log files.
> >
> > If you are using the RedHat RPM then most of what you need is already
> > set up for you. See /etc/logrotate.d/squid and man logrotate.
> >
> > If you are not using logrotate, then see logfile_rotate in squid.conf.
> >
> > --
> > Henrik Nordstrom
> > Squid hacker << File: Card for K.DEEPAK >>
Received on Mon Apr 24 2000 - 11:21:18 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:53:01 MST