/etc/logrotate.d 設定檔案使log可以迴圈寫入(日誌輪詢)

tolywang發表於2010-03-19

 

Let the log automatically rotated when the size is over 100M. You can simply create a file under /etc/logrotate.d,   and write the contact of file as below:

for example ,  edit a file named  'oracle'  in the /etc/logrotate.d  :  

 

/u01/product/oracle/network/log/*.log {
      notifempty
      missingok
      size 100m
      rotate 5
      copytruncate
}

/u01/product/admin/*/bdump/alert_*.log {
      notifempty
      missingok
      size 100m
      rotate 5
      copytruncate
}

/u01/run/log/*.log {
      notifempty
      missingok
      size 100m
      rotate 5
      copytruncate
}

/u01/run/log/*.err {
      notifempty
      missingok
      size 100m
      rotate 5
      copytruncate
}

 

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-629872/,如需轉載,請註明出處,否則將追究法律責任。

相關文章