Chinaunix首页 | 论坛 | 博客
  • 博客访问: 29225
  • 博文数量: 17
  • 博客积分: 685
  • 博客等级: 上士
  • 技术积分: 180
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-26 22:47
文章分类
文章存档

2011年(1)

2009年(16)

我的朋友

分类: LINUX

2009-08-17 17:59:00

一般Logrotate是daily cron job.

option:

       "/var/log/httpd/access.log" /var/log/httpd/error.log {
           rotate 5
           mail www@my.org
           size=100k
           sharedscripts
           postrotate
                                     /sbin/killall -HUP httpd
           endscript
       }

sharedscripts 意味着postrotate script只有在所有的logs都被rotated过了(而且是在compressed之后 )才跑,而不是任何一个log rotate之后都要跑。

missingok 如果log file不存在,则直接转为入一个log file而不会告警

notifempty 如果log文件为空,则不rorate(没有空的Log)
阅读(367) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~