免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1221 | 回复: 4
打印 上一主题 下一主题

求助!! logrotate 不转存 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-02 09:04 |只看该作者 |倒序浏览
现把路由器的log输出到红帽linux 下,希望每天进行日志转存,保留10个备份。但现在问题出来了,就是日志不往新的log文件里记录,仍往最初的log文件里记录。如下所示
----------------------------------
-rw-rw-r--    1 monitor  monitor         0  4月  2 04:03 route.log
-rw-rw-r--    1 monitor  monitor         0  4月  1 04:04 route.log.1
-rw-------    1 monitor  monitor   2215544  4月  2 08:39 route.log.2

----------------------------------
附:
/etc/logrotate.conf 配置

# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.

# pix log write here --wngzhf
/var/log/pix.log {
    daily
    create 0664 root root
    rotate 10
}

# dell_route log write here --wngzhf
/var/log/route.log {
    daily
    create 0664 monitor monitor
    rotate 10
}

请那位兄弟帮帮忙啊!!

论坛徽章:
0
2 [报告]
发表于 2009-04-02 09:06 |只看该作者
自己顶起来..

论坛徽章:
0
3 [报告]
发表于 2009-04-02 09:16 |只看该作者

回复 #2 wngzhf 的帖子

论坛徽章:
0
4 [报告]
发表于 2009-04-02 09:52 |只看该作者
谢谢!
谁能帮帮忙 ,帮解决一下 啊

论坛徽章:
0
5 [报告]
发表于 2009-04-02 11:07 |只看该作者
帮帮忙啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP