st0627 发表于 2019-1-9 11:52:55

cacti不出图基于时区的原因

  PHP Warning:date(): It is not safe to>  07/04/2016 01:33:24 PM - POLLER: Poller 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 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: (root) CMD (/usr/sbin/ntpdate 0.rhel.pool.ntp.org && /sbin/clock -w)
  Jul 15 23:45:01 CactiEZ CROND: (root) CMD (php /var/www/html/poller.php > /dev/null 2>&1)
  Jul 15 23:50:01 CactiEZ CROND: (root) CMD (/usr/sbin/ntpdate 0.rhel.pool.ntp.org && /sbin/clock -w)
  Jul 15 23:50:01 CactiEZ CROND: (root) CMD (php /var/www/html/poller.php > /dev/null 2>&1)
  Jul 15 23:52:02 CactiEZ crontab: (root) REPLACE (root)
  Jul 15 23:52:02 CactiEZ crontab: (root) LIST (root)

  Jul 15 23:53:01 CactiEZ crond: (root)>  Jul 15 23:53:01 CactiEZ CROND: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
  Jul 15 23:54:01 CactiEZ CROND: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
  Jul 15 23:55:01 CactiEZ CROND: (root) CMD (/usr/local/games/lib/y >/dev/null 2>&1)
  Jul 15 23:56:01 CactiEZ CROND: (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分钟,终于出图了。

页: [1]
查看完整版本: cacti不出图基于时区的原因