logrotate
pavel pivonka
pavel.pivonka na centrum.cz
Pondělí Duben 5 13:45:42 CEST 2004
Ahoj vsem,
potrebuji narychlo zkonfigurovat logrotate. Normalni logy, ktere jsou ve
/var-log rotuji OK. Ale treba log od squida nerotuje. Stale prirusta a
ted dosahl velikosti 2 GB. Logrotate ma konfigurak logrotate conf, kde
je:
root na garrison <mailto:root na garrison> :~# vim /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
}
# system-specific logs may be configured here
a logrotate.d/squid ,kde je
#
# Logrotate fragment for squid.
#
/var/log/squid/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
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
}
Potrebuju, aby vsechny file ve NIKDY neprerostli velikost 100 MB (kazdy
z nich)
Pavel
Další informace o konferenci Linux