linux系统rsyslog服务开启,logrotate启用,但是系统不产生日志,请问这是什么原因造成的?

linux系统rsyslog服务开启,logrotate启用,但是系统不产生日志。哪位大神知道怎么回事,logrotate和rsyslog配置文件都是默认的没改动。日志从10月1号就没有了。系统是centos6.5
[root@CTG145 log]# ls
anaconda.ifcfg.log btmp-20171101 dmesg.old messages secure sssd
anaconda.log ConsoleKit dracut.log messages-20170910 secure-20170910 tallylog
anaconda.program.log cron httpd messages-20170917 secure-20170917 version_control
anaconda.storage.log cron-20171008 lastlog messages-20170924 secure-20170924 wtmp
anaconda.syslog cron-20171015 maillog messages-20171001 secure-20171001 yum.log
anaconda.xlog cron-20171022 maillog-20170910 mysqld.log spooler
anaconda.yum.log cron-20171029 maillog-20170917 ntpstats spooler-20170910
audit cron-20171105 maillog-20170924 prelink spooler-20170917
boot.log cups maillog-20171001 sa spooler-20170924
btmp dmesg mcelog samba spooler-20171001
[root@CTG145 log]# cd httpd
[root@CTG145 httpd]# ls
access_log access_log-20170917 access_log-20171001 error_log-20170910 error_log-20170924
access_log-20170910 access_log-20170924 error_log error_log-20170917 error_log-20171001
logrotate配置都是默认的:

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

use date as a suffix of the rotated file

dateext

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 and btmp -- we'll rotate them here

/var/log/wtmp {

monthly
create 0664 root utmp
    minsize 1M

这个问题很奇怪,难道是rsyslog有其他什么机制么?cron有10月1号以后的日志,但内容是空。系统有周期计划,不应该是空的日志。判断系统确实没有生成日志。

参与6

1同行回答

黎前红黎前红  系统工程师 , 信息产业
1.我们之前出现过将日志文件设置为非/var/log目录,无法产生日志文件,后来查的时候是因为selinux的访问控制,后来修改为disabled,之后重启syslog并在指定目录下生成日志文件,就好了。2.还有一种可能,你日志某段时间重启过,然后出现了日志文件不能正常写入,解决方法一般是重新装rsy...显示全部

1.我们之前出现过将日志文件设置为非/var/log目录,无法产生日志文件,后来查的时候是因为selinux的访问控制,后来修改为disabled,之后重启syslog并在指定目录下生成日志文件,就好了。
2.还有一种可能,你日志某段时间重启过,然后出现了日志文件不能正常写入,解决方法一般是重新装rsyslog,千万要记住删除配置文件,删除之前先拍照,方便对比。然后再重建配置文件,重启,看看行不行。

收起
系统集成 · 2017-11-07
浏览4727
王磊磊 邀答

提问者

田大少
项目经理滴滴出行

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2017-11-07
  • 关注会员:2 人
  • 问题浏览:5006
  • 最近回答:2017-11-07
  • X社区推广