Comment 2 for bug 1662027

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Paul,

I do see at least 6b5931130770cdfa5baa68c43a913dcabf1c3970 upstream that fixes the split() calls in question. Is it suitable to just make those changes in the versions in Ubuntu. Specifically:

--- cacti-0.8.8f+ds1.orig/poller.php
+++ cacti-0.8.8f+ds1/poller.php
@@ -451,11 +451,9 @@ while ($poller_runs_completed < $poller_

                /* sleep the appripriate amount of time */
                if ($poller_runs_completed < $poller_runs) {
- list($micro, $seconds) = split(' ', microtime());
- $plugin_start = $seconds + $micro;
+ $plugin_start = microtime(true);
                        api_plugin_hook('poller_bottom');
- list($micro, $seconds) = split(' ', microtime());
- $plugin_end = $seconds + $micro;
+ $plugin_end = microtime(true);
                        if (($sleep_time - ($plugin_end - $plugin_start)) > 0) {
                                usleep(($sleep_time - ($plugin_end - $plugin_start)) * 1000000);
                        }

Probably adjusted a bit for the various versions in the releases? Or are more fixes from upstream needed?