On 11.11.15 09:25, Verónica Ovando wrote:
I am using logrotate with this configuration in /etc/logrotate.d/squid3:
/var/log/squid3/access.log {
maxsize 50M
daily
compress
delaycompress
rotate 5
missingok
notifempty
create 0640 proxy proxy
sharedscripts
postrotate
test ! -e /var/run/squid3.pid || test ! -x
/usr/sbin/squid3 || /usr/sbin/squid3 -k rotate
endscript
}
/var/log/squid3/cache.log {
maxsize 50M
daily
compress
delaycompress
rotate 5
missingok
notifempty
create 0640 proxy proxy
sharedscripts
postrotate
test ! -e /var/run/squid3.pid || test ! -x
/usr/sbin/squid3 || /usr/sbin/squid3 -k rotate
endscript
}
In my /etc/crontab.daily logrotate is present.
In my squid.conf file logfile_rotate is set to 0.
My files are growing very quickly, they are more than 50 MB of size
(some of them more than 2 GB). I have to execute manually squid3 -k
rotate for the log rotation.
apparently logrotate is run once daily and those files are to be checked
daily. you must use "maxsize" and run logrotate more often than daily to
force rotation when files grow over the limit.
I recommend rotating both access and cache files at the same time, btw.
--
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux IS user friendly, it's just selective who its friends are...
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users