ITPub博客

首页 > Linux操作系统 > Linux操作系统 > /etc/logrotate.d 设置文件使log可以循环写入(日志轮询)

/etc/logrotate.d 设置文件使log可以循环写入(日志轮询)

原创 Linux操作系统 作者:tolywang 时间:2010-03-19 04:39:20 0 删除 编辑

 

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博客 ” ,链接:https://blog.itpub.net/35489/viewspace-629872/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Oracle simple stream
请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14695624