Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1783884
  • 博文数量: 276
  • 博客积分: 1574
  • 博客等级: 上尉
  • 技术积分: 2894
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-26 23:23
个人简介

生活的美妙在于,不知道一下秒是惊艳还是伤神,时光流转,珍惜现在的拥有的时光

文章分类

全部博文(276)

文章存档

2017年(17)

2016年(131)

2015年(63)

2013年(2)

2012年(32)

2011年(31)

分类: 系统运维

2015-10-28 10:49:54

[root@zabbix tmp]# tail -f -n 1 /var/log/cron
Oct 27 22:15:01 zabbix CROND[32037]: (cacti) CMD (/bin/php /var/www/html/cacti/poller.php > /tmp/cacti.log 2>&1)

[root@zabbix tmp]# date
Wed Oct 28 10:16:15 CST 2015
原因是系统时区修改后,必须重启crontab服务才会生效
[root@zabbix tmp]# service crond restart
如果这时还没有生效
查看其它日志文件日期,如果全部都有问题,说明是rsyslogd服务的日志没有生效
[root@zabbix log]# systemctl restart rsyslog
[root@zabbix log]# tail -f /var/log/messages
Oct 27 22:27:01 zabbix systemd: Started Session 1416 of user root.
Oct 27 22:28:01 zabbix systemd: Starting Session 1417 of user root.
Oct 27 22:28:01 zabbix systemd: Started Session 1417 of user root.
Oct 27 22:29:01 zabbix systemd: Starting Session 1418 of user root.
Oct 27 22:29:01 zabbix systemd: Started Session 1418 of user root.
Oct 27 22:29:03 zabbix rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="595" x-info=""] exiting on signal 15.
Oct 28 10:29:03 zabbix rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="17278" x-info=""] start
Oct 28 10:29:03 zabbix systemd: Stopping System Logging Service...
Oct 28 10:29:03 zabbix systemd: Starting System Logging Service...
Oct 28 10:29:03 zabbix systemd: Started System Logging Service.
[root@zabbix log]# tail -f /var/log/cron
Oct 27 22:23:01 zabbix CROND[17186]: (root) CMD (date > /tmp/date.log)
Oct 27 22:24:01 zabbix CROND[17192]: (root) CMD (date > /tmp/date.log)
Oct 27 22:25:01 zabbix CROND[17205]: (root) CMD (date > /tmp/date.log)
Oct 27 22:25:27 zabbix crond[17222]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 89% if used.)
Oct 27 22:25:27 zabbix crond[17222]: (CRON) INFO (running with inotify support)
Oct 27 22:25:27 zabbix crond[17222]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Oct 27 22:26:02 zabbix CROND[17226]: (root) CMD (date > /tmp/date.log)
Oct 27 22:27:01 zabbix CROND[17231]: (root) CMD (date > /tmp/date.log)
Oct 27 22:28:01 zabbix CROND[17238]: (root) CMD (date > /tmp/date.log)
Oct 27 22:29:01 zabbix CROND[17272]: (root) CMD (date > /tmp/date.log)
Oct 28 10:30:01 zabbix CROND[17288]: (root) CMD (date > /tmp/date.log)
现在日志对了.
阅读(4802) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~