修改rsyslog文件,将/etc/rsyslog.d/50-default.conf 文件中的#cron.*前的#删掉;
重启rsyslog服务service rsyslog restart;
重启cron服务service cron restart;
more /var/log/cron.log
查看 日志
代码: 全选
Mar 9 17:35:48 yqmx cron[16861]: (CRON) INFO (pidfile fd = 3)
Mar 9 17:35:48 yqmx cron[16862]: (CRON) STARTUP (fork ok)
Mar 9 17:35:48 yqmx cron[16862]: (*system*) WRONG INODE INFO (/etc/crontab)
Mar 9 17:35:48 yqmx cron[16862]: (CRON) INFO (Skipping @reboot jobs -- not syst
em startup)
Mar 9 17:39:01 yqmx CRON[16876]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ]
&& [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/m
axlifetime) -print0 | xargs -n 200 -r -0 rm)
Mar 9 17:39:01 yqmx CRON[16875]: (CRON) info (No MTA installed, discarding outp
ut)
Mar 9 17:41:24 yqmx crontab[16893]: (root) LIST (root)
Mar 9 17:43:30 yqmx cron[16898]: (CRON) INFO (pidfile fd = 3)
Mar 9 17:43:30 yqmx cron[16899]: (CRON) STARTUP (fork ok)
Mar 9 17:43:30 yqmx cron[16899]: (*system*) WRONG INODE INFO (/etc/crontab)
Mar 9 17:43:30 yqmx cron[16899]: (CRON) INFO (Skipping @reboot jobs -- not syst
em startup)
Mar 9 17:45:01 yqmx CRON[16902]: (root) CMD (command -v debian-sa1 > /dev/null
&& debian-sa1 1 1)
Mar 9 17:55:01 yqmx CRON[16942]: (root) CMD (command -v debian-sa1 > /dev/null
&& debian-sa1 1 1)
Mar 9 17:58:02 yqmx crontab[16955]: (root) BEGIN EDIT (root)
Mar 9 18:02:01 yqmx cron[16899]: (*system*) WRONG INODE INFO (/etc/crontab)
Mar 9 18:02:12 yqmx cron[16979]: (CRON) INFO (pidfile fd = 3)
Mar 9 18:02:12 yqmx cron[16980]: (CRON) STARTUP (fork ok)
Mar 9 18:02:12 yqmx cron[16980]: (*system*) WRONG INODE INFO (/etc/crontab)
Mar 9 18:02:12 yqmx cron[16980]: (CRON) INFO (Skipping @reboot jobs -- not syst
root@yqmx:~#
root@yqmx:~# php /var/www/cacti/poller.php
03/09/2011 06:08:19 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300 ' second Cron, but 373 seconds have passed since the last poll!
03/09/2011 06:08:19 PM - SYSTEM STATS: Time:0.1049 Method:spine Processes:1 Thre ads:1 Hosts:3 HostsPerProcess:3 DataSources:0 RRDsProcessed:0
root@yqmx:~# php /var/www/cacti/poller.php
任务是
crontag * * * * * php /var/www/cacti/poller.php 2&>1 /dev/null
急等。