PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /var/www/html/cacti/lib/functions.php on line 482
07/04/2016 01:33:24 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 571 seconds have passed since the last poll!
07/04/2016 01:33:25 PM - SYSTEM STATS: Time:1.2075 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:21 RRDsProcessed:20
通过网上搜索,说是时间不对,更改时间,在Php.ini最前面中加了一条:
date.timezone =PRC
更改完成后,再手工执行,终于没报错了,但还是不出图。
同时在Web页面的Cacti日志 里看到:
POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 1555 seconds have passed since the last poll!
查找相关资料说是Poller执行时间有问题。
查看Cron的log,看到之前正常的时候每5分钟Poller在日志里都有一条记录:
Jul 15 23:40:01 CactiEZ CROND[19513]: (root) CMD (/usr/sbin/ntpdate 0.rhel.pool.ntp.org && /sbin/clock -w)
Jul 15 23:45:01 CactiEZ CROND[19572]: (root) CMD (php /var/www/html/poller.php > /dev/null 2>&1)
Jul 15 23:50:01 CactiEZ CROND[19723]: (root) CMD (/usr/sbin/ntpdate 0.rhel.pool.ntp.org && /sbin/clock -w)
Jul 15 23:50:01 CactiEZ CROND[19724]: (root) CMD (php /var/www/html/poller.php > /dev/null 2>&1)
Jul 15 23:52:02 CactiEZ crontab[19982]: (root) REPLACE (root)
Jul 15 23:52:02 CactiEZ crontab[19983]: (root) LIST (root)
Jul 15 23:53:01 CactiEZ crond[1314]: (root) RELOAD (/var/spool/cron/root)
Jul 15 23:53:01 CactiEZ CROND[20001]: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
Jul 15 23:54:01 CactiEZ CROND[20006]: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
Jul 15 23:55:01 CactiEZ CROND[20012]: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
Jul 15 23:56:01 CactiEZ CROND[20018]: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
但在这个时间之后就没有了,于是在Crontab里手工加入一条:
*/5 * * * * root usr/bin/php /var/www/html/poller.php > /dev/null 2>&1
重启crond的服务后,等10分钟,终于出图了。
转载于:https://blog.51cto.com/wyhstar460/1833453