logrotate does not work with zebra log file

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

 



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

[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