function boost_poller_command_args($args) { boost_memory_limit(); return $args; }
print 'ERROR: Invalid Parameter ' . $parameter . "\n\n"; display_help(); exit; } } /* install signal handlers for UNIX only */ if (function_exists('pcntl_signal')) { pcntl_signal(SIGTERM, 'sig_handler'); pcntl_signal(SIGINT, 'sig_handler'); } /* take time and log performance data */ list($micro, $seconds) = explode(' ', microtime()); $start = $seconds + $micro; /* let's give this script lot of time to run for ever */ ini_set('max_execution_time', '0'); boost_memory_limit(); if (read_config_option('boost_rrd_update_enable') == 'on' || $forcerun) { /* turn on the system level updates as that is what dictates "on/off" */ if (!$forcerun && read_config_option('boost_rrd_update_system_enable') != 'on') { db_execute("REPLACE INTO settings (name,value)\n\t\t\tVALUES ('boost_rrd_update_system_enable','on')"); } $seconds_offset = read_config_option('boost_rrd_update_interval') * 60; /* find out if it's time to collect device information */ $last_run_time = strtotime(read_config_option('boost_last_run_time')); $next_run_time = strtotime(read_config_option('boost_next_run_time')); /* determine the next start time */ $current_time = time(); if (empty($last_run_time)) { /* since the poller has never run before, let's fake it out */ $next_run_time = $current_time + $seconds_offset; db_execute("REPLACE INTO settings (name, value) VALUES ('boost_last_run_time', '" . date('Y-m-d G:i:s', $current_time) . "')");