RE: logrotate does not work with zebra log file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



AFAIK, in debug mode logrotate doesn't change files, you should run logrotate *without* debug.

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx]On Behalf Of shen mode
Sent: Saturday, January 22, 2005 11:55 AM
To: redhat list; Zebra
Subject: logrotate does not work with zebra log file


Hi,

I tried to rotate ospf log file which is created by
ospfd in zebra. 

I set up logrotate.conf like:

/data1/netflow/zebra/log/ospf.log {
    daily
    rotate 7
    copytruncate
    compress
}


and execute logrotate as:

 /usr/sbin/logrotate -s /var/log/logrotate.status
/etc/logrotate.conf -f --debug

it shows :

rotating pattern: /data1/netflow/zebra/log/ospf.log 
forced from command line (7 rotations)
empty log files are rotated, old logs are removed
considering log /data1/netflow/zebra/log/ospf.log
  log needs rotating
rotating log /data1/netflow/zebra/log/ospf.log,
log->rotateCount is 7
renaming /data1/netflow/zebra/log/ospf.log.7.gz to
/data1/netflow/zebra/log/ospf.log.8.gz (rotatecount 7,
logstart 1, i 7), 
renaming /data1/netflow/zebra/log/ospf.log.6.gz to
/data1/netflow/zebra/log/ospf.log.7.gz (rotatecount 7,
logstart 1, i 6), 
renaming /data1/netflow/zebra/log/ospf.log.5.gz to
/data1/netflow/zebra/log/ospf.log.6.gz (rotatecount 7,
logstart 1, i 5), 
renaming /data1/netflow/zebra/log/ospf.log.4.gz to
/data1/netflow/zebra/log/ospf.log.5.gz (rotatecount 7,
logstart 1, i 4), 
renaming /data1/netflow/zebra/log/ospf.log.3.gz to
/data1/netflow/zebra/log/ospf.log.4.gz (rotatecount 7,
logstart 1, i 3), 
renaming /data1/netflow/zebra/log/ospf.log.2.gz to
/data1/netflow/zebra/log/ospf.log.3.gz (rotatecount 7,
logstart 1, i 2), 
renaming /data1/netflow/zebra/log/ospf.log.1.gz to
/data1/netflow/zebra/log/ospf.log.2.gz (rotatecount 7,
logstart 1, i 1), 
renaming /data1/netflow/zebra/log/ospf.log.0.gz to
/data1/netflow/zebra/log/ospf.log.1.gz (rotatecount 7,
logstart 1, i 0), 
copying /data1/netflow/zebra/log/ospf.log to
/data1/netflow/zebra/log/ospf.log.1
truncating /data1/netflow/zebra/log/ospf.log
compressing new log with: /bin/gzip 
'/data1/netflow/zebra/log/ospf.log.1'
removing old log
/data1/netflow/zebra/log/ospf.log.8.gz
[root@net log]# 

but when I check /data1/netflow/zebra/log, I noticed
there is nothing changed to ospf.log, and no
ospflog.gz is created. 

Do I miss something with configuration?

thanks

Joe



_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster@xxxxxxx and destroy the original message.
***********************************************************************************

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux