Re: Frage zu logrotate
Moin,
langsam geht mir das mit den Logs echt auf den Keks...
Logrotate legt jetzt zwar richtig die Logilfes an,
nur schreibt der Squid in das falsche File! Warum???
Gestern wurde noch in access.log geschrieben. Nach
06:25 wurde access.log in access.log.1 umbenannt,
aber der Squid schreibt jetzt in access.log.1!
Kann mir jemand sagen warum?
hdb01:~/downloads# l /var/log/squid
total 194M
drwxr-x--- 2 proxy proxy 4.0k Apr 6 06:25 .
drwxr-xr-x 10 root root 4.0k Apr 6 06:25 ..
-rw-r----- 1 proxy proxy 0 Apr 6 06:25 access.log
-rw-r----- 1 proxy proxy 114M Apr 6 10:54 access.log.1
-rw-r----- 1 proxy proxy 0 Apr 6 06:25 cache.log
-rw-r----- 1 proxy proxy 92k Apr 6 09:51 cache.log.1
-rw-r----- 1 proxy proxy 0 Apr 6 06:25 store.log
-rw-r----- 1 proxy proxy 79M Apr 6 10:54 store.log.1
Grüße
Mathias
Hier noch die Konfig:
hdb01:~/downloads# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/squid/*.log {
daily
compress
delaycompress
rotate 14
# nocreate
missingok
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
endscript
postrotate
test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
endscript
}
Reply to: