[gl-como] Problemini con logrotate

Incubus theincubus@gmail.com
Ven 26 Giu 2009 20:55:50 CEST


Una cosa che vorrei capire è: secondo quale principio logrotate decide
se un log nuovo o vecchio che sia, decide se ha bisogno di essere
ruotato o meno?

> Domanda numero 1.
> Hai provato da riga di comando?

Si, ho provato il debug e il force ma nn è cambiato nulla: per alcuni
log (apache) ruota bene, per altri li elimina anzichè creare quello
compresso (postfix) per altri ruote ma non comprime (squid).

> Di solito logrotate non da risultati, ma c'è il return code, che è
> diverso da zero in caso di errori. Potresti cominciare da quello.

Da linea di comando genera di tutto tranne error code :-P


> Poi logrotate -d va in debug mode (non dovrebbe fare niente sui logfile)
> e ti dovrebbe dire cosa fa.

Di seguito:
pribnowbox incubus # logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file 10apache2
reading config info for /var/log/apache2/*.log
reading config file 15postfix
reading config info for /var/log/mail/*.log
reading config file 20proftpd
reading config info for /var/log/proftpd/*.log
reading config file 25squid
reading config info for /var/log/squid/*.log
reading config file 50ssh
reading config info for /var/log/sshd/*.log
reading config file 60mysql
reading config info for /var/log/mysql/*.log
reading config file 65IOSBackup
reading config info for /home/tftp/*config
reading config file 70routers
reading config info for /var/log/router/*.log
reading config file 75auth
reading config info for /var/log/auth.log
reading config file 77btmp
reading config info for /var/log/btmp
reading config file 78wtmp
reading config info for /var/log/wtmp
reading config file 80dpsearch
reading config info for /var/log/dpsearch/*.log
reading config file 90syslog-ng
reading config info for /var/log/messages /var/log/syslog
reading config file 94privoxy
reading config info for /var/log/privoxy/privoxy.log
reading config file 95tor
reading config info for /var/log/tor/*.log
reading config file 97rsync
reading config info for /var/log/rsync.log
reading config file 99elog-save-summary
reading config info for /var/log/portage/elog/summary.log

Handling 17 logs

rotating pattern: /var/log/apache2/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/apache2/access.log
  log does not need rotating
considering log /var/log/apache2/error.log
  log does not need rotating
considering log /var/log/apache2/horde.log
  log does not need rotating
not running first action script, since no logs will be rotated
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/mail/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mail/imapd.log
  log does not need rotating
considering log /var/log/mail/info.log
  log does not need rotating
considering log /var/log/mail/mail.log
  log does not need rotating
considering log /var/log/mail/warn.log
  log does not need rotating
not running first action script, since no logs will be rotated
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/proftpd/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/proftpd/access.log
  log does not need rotating
considering log /var/log/proftpd/error.log
  log does not need rotating
considering log /var/log/proftpd/mysql.log
  log does not need rotating
not running first action script, since no logs will be rotated
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/squid/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/squid/access.log
  log does not need rotating
considering log /var/log/squid/cache.log
  log does not need rotating
considering log /var/log/squid/store.log
  log does not need rotating
not running first action script, since no logs will be rotated
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/sshd/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/sshd/ssh.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/mysql/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mysql/error-mysqld.log
  log does not need rotating
considering log /var/log/mysql/slow_query.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /home/tftp/*config  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/tftp/hellgate-running-config
  log does not need rotating
considering log /home/tftp/hellgate-startup-config
  log does not need rotating
not running first action script, since no logs will be rotated
not running postrotate script, since no logs were rotated
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/router/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/router/Hellgate.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/auth.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/auth.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/btmp  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
error: stat of /var/log/btmp failed: No such file or directory

rotating pattern: /var/log/wtmp  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/wtmp
  log does not need rotating

rotating pattern: /var/log/dpsearch/*.log  after 1 days (7 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/dpsearch/cached.log
  log does not need rotating
considering log /var/log/dpsearch/indexer.log
  log does not need rotating
considering log /var/log/dpsearch/searchcgi.log
  log does not need rotating
considering log /var/log/dpsearch/searchd.log
  log does not need rotating

rotating pattern: /var/log/messages /var/log/syslog after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/messages
  log does not need rotating
considering log /var/log/syslog
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/privoxy/privoxy.log after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/privoxy/privoxy.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/tor/*.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/tor/tor.log
  log does not need rotating
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/rsync.log  after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rsync.log
  log /var/log/rsync.log does not exist -- skipping

rotating pattern: /var/log/portage/elog/summary.log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/portage/elog/summary.log
  log /var/log/portage/elog/summary.log does not exist -- skipping
pribnowbox incubus #


-- 
KNOWLEDGE IS POWER
http://incubus.homelinux.net
http://www.gl-como.it


Maggiori informazioni sulla lista gl-como