Donc ca dit qu'il a fait une rotation cette nuit mais depuis plus rien.
en fait comme il en a dejà fait un, il en fera pas d'autre avant demain:
error: destination /var/log/squid/cache.log-20210708.gz already exists, skipping rotation
fichier cron.hourly
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit $EXITVALUE
et tjrs le fichier de conf squid_cache (sous logrotate.d)
/var/log/squid/cache.log {
rotate 2
size 5G
compress
notifempty
missingok
nocreate
sharedscripts
postrotate
# Asks squid to reopen its logs. (logfile_rotate 0 is set in squid.conf)
# errors redirected to make it silent if squid is not running
/usr/sbin/squid -k rotate 2>/dev/null
# Wait a little to allow Squid to catch up before the logs is compressed
sleep 1
endscript
}
[^] # Re: wait and see
Posté par kbvz . En réponse au message Cache log de squid ne tourne pas. Évalué à 1.
Bonjour,
Donc ca dit qu'il a fait une rotation cette nuit mais depuis plus rien.
en fait comme il en a dejà fait un, il en fera pas d'autre avant demain:
error: destination /var/log/squid/cache.log-20210708.gz already exists, skipping rotation
fichier cron.hourly
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit $EXITVALUE
et tjrs le fichier de conf squid_cache (sous logrotate.d)
/var/log/squid/cache.log {
rotate 2
size 5G
compress
notifempty
missingok
nocreate
sharedscripts
postrotate
# Asks squid to reopen its logs. (logfile_rotate 0 is set in squid.conf)
# errors redirected to make it silent if squid is not running
/usr/sbin/squid -k rotate 2>/dev/null
# Wait a little to allow Squid to catch up before the logs is compressed
sleep 1
endscript
}