Carlos E. R. wrote:
El 2005-05-10 a las 09:28 -0400, Hipolito A. Gonzalez M. escribió:
Que puede estar pasando? Gracias!
Nada. Lo pone en el manual :-p
Prueba a cambiar el tamaño a 2 megas, y a ver si rota alguno.
He probasdo con 10 (como estaba hace como un año), con 4, con 2.... Pero poner tan pequeño hace que casi no se tenga un historial de facil acceso de los ultimos pocos dias. Lo que necesito es que borre al pasar de 10, y esto me ha ocurrido a veces en algunos sistemas, es aleatorio, algunos si, otros no.
A ver.
Dije que no el programa no mira siquiera si existen logs antiguos hasta el instante en que el actual pasa de cuatro megas y lo comprime. Justo en ese instante es cuando debe mirar si hay 10 o 100 logs antiguos. Por tanto cuando tu ahora ejecutas "logrotate -d /etc/logrotate.conf" no ocurre nada.
Por eso te dije que pusieras el límite temporalmente a 2 megas (no dos ficheros) y ejecutaras logrotate, a ver si funciona.
yo te entiendo perfectamente, pero fijate, cuando pasa de los 4 megas el si lo comprime, por cierto, lo hizo hace pocos minutos.. fijate... Openserver:/var/log # ls -al mai* -rw-r--r-- 1 root root 803178 May 11 09:50 mail -rw-r--r-- 1 root root 443457 Jul 17 2004 mail-20040717.bz2 -rw-r--r-- 1 root root 348039 Jul 20 2004 mail-20040720.bz2 -rw-r--r-- 1 root root 461522 Jul 22 2004 mail-20040722.bz2 -rw-r--r-- 1 root root 391856 Jul 23 2004 mail-20040724.bz2 -rw-r--r-- 1 root root 522240 Jul 28 2004 mail-20040728.bz2 -rw-r--r-- 1 root root 409235 Jul 29 2004 mail-20040730.bz2 -rw-r--r-- 1 root root 361794 Aug 3 2004 mail-20040803.bz2 -rw-r--r-- 1 root root 512512 Aug 6 2004 mail-20040806.bz2 -rw-r--r-- 1 root root 434347 Aug 10 2004 mail-20040810.bz2 -rw-r--r-- 1 root root 370326 Aug 12 2004 mail-20040812.bz2 -rw-r--r-- 1 root root 359601 Aug 14 2004 mail-20040814.bz2 -rw-r--r-- 1 root root 518631 Aug 19 2004 mail-20040819.bz2 ..... continua mas abajo -rw-r--r-- 1 root root 386168 Apr 23 00:07 mail-20050423.bz2 -rw-r--r-- 1 root root 524232 Apr 27 00:14 mail-20050427.bz2 -rw-r--r-- 1 root root 394008 Apr 29 00:05 mail-20050429.bz2 -rw-r--r-- 1 root root 523363 May 3 00:09 mail-20050503.bz2 -rw-r--r-- 1 root root 427994 May 5 00:14 mail-20050505.bz2 -rw-r--r-- 1 root root 419475 May 7 00:12 mail-20050507.bz2 -rw-r--r-- 1 root root 444113 May 11 00:13 mail-20050511.bz2 Mira el ultimo, lo hizo hoy a las 00:12 GMT -4. Es decir, si hace la compresion cuando pasa de 4 megas! Voy a pner eso en 500 bytes y hago la prueba, te lo mando aqui abajo
Ya que el email se ha recortado elimiando un poco del anterio, pego algunas lineas mas:
No me hacen falta.
Vistes amigo?
Ni con el de postgresql lo hace, esta en 10 y lleva como 12
Poprque el log tiene menos de 1048576 bytes. Hasta que no llege a ese limite, importa un bledo que haya 12 antiguos.
bueno, aqui voy con 500 Kb, ya que el mail de ahorita tiene 800 Kb Openserver:/etc/logrotate.d # logrotate -d /etc/logrotate.conf reading config file /etc/logrotate.conf compress_prog is now /usr/bin/bzip2 uncompress_prog is now /usr/bin/bunzip2 including /etc/logrotate.d reading config file syslog reading config info for /var/log/mail /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall reading config file aaa_base reading config info for /var/log/mgetty.* reading config info for /var/log/vgetty.* reading config info for /var/log/vbox.tty* reading config info for /var/adm/isdn.log reading config info for /var/lib/xdm/xdm-errors reading config info for /var/log/debug reading config info for /var/log/isdn reading config info for /var/log/isdn.log reading config info for /var/log/isdncalls reading config info for /var/log/log.ceptd reading config info for /var/log/samba/log.nmbd reading config info for /var/log/samba/log.smbd reading config info for /var/log/samba/log.winbindd reading config info for /var/log/maillog reading config info for /var/log/ntp reading config info for /var/log/pop3svr.log reading config info for /var/log/pvf.log reading config info for /var/log/rinetd.log reading config info for /var/log/rsyncd.log reading config info for /var/log/wtmp reading config info for /var/log/xdm.errors reading config info for /var/log/xferlog reading config info for /var/log/radius.log reading config info for /var/log/radwatch.log reading config info for /var/log/radwtmp reading config file apache reading config info for /var/log/httpd/access_log reading config info for /var/log/httpd/error_log reading config info for /var/log/httpd/suexec.log reading config info for /var/log/httpd/ssl_request_log reading config info for /var/log/httpd/ssl_engine_log reading config file postgresql reading config info for /var/log/postgresql reading config file groupware reading config info for /var/log/groupware.log reading config info for /var/log/jserv/jserv.log reading config file dyce reading config info for /var/log/dyce.log reading config info for /var/opt/dyce/log/access.log reading config file webmail reading config info for /var/log/webmail.log reading config file ucdsnmp reading config info for /var/log/ucd-snmpd.log Handling 38 logs rotating pattern: /var/log/mail /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall 512000 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/mail log needs rotating glob finding old rotated logs failed renaming /var/log/mail to /var/log/mail-20050511 creating new log mode = 0644 uid = 0 gid = 0 new log /var/log/mail-20050511 does not exist rotating file /var/log/warn log needs rotating glob finding old rotated logs failed renaming /var/log/warn to /var/log/warn-20050511 creating new log mode = 0644 uid = 0 gid = 0 new log /var/log/warn-20050511 does not exist rotating file /var/log/messages log needs rotating glob finding old rotated logs failed renaming /var/log/messages to /var/log/messages-20050511 creating new log mode = 0644 uid = 0 gid = 0 new log /var/log/messages-20050511 does not exist rotating file /var/log/allmessages file /var/log/allmessages does not exist -- skipping rotating file /var/log/localmessages log needs rotating glob finding old rotated logs failed renaming /var/log/localmessages to /var/log/localmessages-20050511 creating new log mode = 0644 uid = 0 gid = 0 new log /var/log/localmessages-20050511 does not exist rotating file /var/log/firewall file /var/log/firewall does not exist -- skipping running shared postrotate script running script with arg /var/log/mail /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall : " /etc/init.d/syslog reload " rotating pattern: /var/log/mgetty.* 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/mgetty.* file /var/log/mgetty.* does not exist -- skipping rotating pattern: /var/log/vgetty.* 2097152 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/vgetty.* file /var/log/vgetty.* does not exist -- skipping rotating pattern: /var/log/vbox.tty* 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/vbox.tty* file /var/log/vbox.tty* does not exist -- skipping rotating pattern: /var/adm/isdn.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/adm/isdn.log file /var/adm/isdn.log does not exist -- skipping rotating pattern: /var/lib/xdm/xdm-errors 204800 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/lib/xdm/xdm-errors file /var/lib/xdm/xdm-errors does not exist -- skipping rotating pattern: /var/log/debug 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/debug file /var/log/debug does not exist -- skipping rotating pattern: /var/log/isdn 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/isdn file /var/log/isdn does not exist -- skipping rotating pattern: /var/log/isdn.log 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/isdn.log file /var/log/isdn.log does not exist -- skipping rotating pattern: /var/log/isdncalls 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/isdncalls file /var/log/isdncalls does not exist -- skipping rotating pattern: /var/log/log.ceptd 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/log.ceptd file /var/log/log.ceptd does not exist -- skipping rotating pattern: /var/log/samba/log.nmbd 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/samba/log.nmbd file /var/log/samba/log.nmbd does not exist -- skipping rotating pattern: /var/log/samba/log.smbd 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/samba/log.smbd file /var/log/samba/log.smbd does not exist -- skipping rotating pattern: /var/log/samba/log.winbindd 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/samba/log.winbindd file /var/log/samba/log.winbindd does not exist -- skipping rotating pattern: /var/log/maillog 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/maillog file /var/log/maillog does not exist -- skipping rotating pattern: /var/log/ntp 2097152 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/ntp log does not need rotating rotating pattern: /var/log/pop3svr.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/pop3svr.log file /var/log/pop3svr.log does not exist -- skipping rotating pattern: /var/log/pvf.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/pvf.log file /var/log/pvf.log does not exist -- skipping rotating pattern: /var/log/rinetd.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/rinetd.log file /var/log/rinetd.log does not exist -- skipping rotating pattern: /var/log/rsyncd.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/rsyncd.log file /var/log/rsyncd.log does not exist -- skipping rotating pattern: /var/log/wtmp 409600 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/wtmp log does not need rotating rotating pattern: /var/log/xdm.errors 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/xdm.errors log does not need rotating rotating pattern: /var/log/xferlog 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/xferlog file /var/log/xferlog does not exist -- skipping rotating pattern: /var/log/radius.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/radius.log file /var/log/radius.log does not exist -- skipping rotating pattern: /var/log/radwatch.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/radwatch.log file /var/log/radwatch.log does not exist -- skipping rotating pattern: /var/log/radwtmp 2097152 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/radwtmp file /var/log/radwtmp does not exist -- skipping rotating pattern: /var/log/httpd/access_log 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/httpd/access_log log does not need rotating rotating pattern: /var/log/httpd/error_log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/httpd/error_log log does not need rotating rotating pattern: /var/log/httpd/suexec.log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/httpd/suexec.log file /var/log/httpd/suexec.log does not exist -- skipping rotating pattern: /var/log/httpd/ssl_request_log 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/httpd/ssl_request_log log does not need rotating rotating pattern: /var/log/httpd/ssl_engine_log 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/httpd/ssl_engine_log log does not need rotating rotating pattern: /var/log/postgresql 1048576 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/postgresql log does not need rotating rotating pattern: /var/log/groupware.log 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/groupware.log log does not need rotating rotating pattern: /var/log/jserv/jserv.log 4194304 bytes (10 rotations) empty log files are not rotated old logs are removed rotating file /var/log/jserv/jserv.log log does not need rotating rotating pattern: /var/log/dyce.log 4194304 bytes (99 rotations) empty log files are not rotated old logs are removed rotating file /var/log/dyce.log file /var/log/dyce.log does not exist -- skipping rotating pattern: /var/opt/dyce/log/access.log 4194304 bytes (99 rotations) empty log files are not rotated old logs are removed rotating file /var/opt/dyce/log/access.log file /var/opt/dyce/log/access.log does not exist -- skipping rotating pattern: /var/log/webmail.log 4194304 bytes (99 rotations) empty log files are not rotated old logs are removed rotating file /var/log/webmail.log log does not need rotating rotating pattern: /var/log/ucd-snmpd.log 1048576 bytes (99 rotations) empty log files are not rotated old logs are removed rotating file /var/log/ucd-snmpd.log file /var/log/ucd-snmpd.log does not exist -- skipping Fijate que en donde puse 500 KBytes me dice que si necesita rotacion, si lo hace Pero no borra los anteriores!!!! Porque anoche lo hizo con 4 Mb, comprimio, creo uno nuevo, pero no borro los anteriores. Es de lo mas raro! -- ------------------------------------------------------ Una prensa libre es el gran enemigo de los dictadores. Independientemente de sus abusos, sus debilidades, sus errores. Una prensa libre es la gran aliada y defensora de la democracia. Charlos S. Shapiro Embajador de USA en la Rep. de Venezuela Martes, 20 de Mayo 2003