From df34132661c38afc906fab8dd8dbf9ed0e4e1941 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 21 Jul 2010 18:29:04 +0000 Subject: [PATCH] no rrdcached for create ! git-svn-id: http://www.observium.org/svn/observer/trunk@1456 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/ucd-diskio.inc.php | 1 - includes/rrdtool.inc.php | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/polling/ucd-diskio.inc.php b/includes/polling/ucd-diskio.inc.php index 3cd26695c..53c0fdcdb 100644 --- a/includes/polling/ucd-diskio.inc.php +++ b/includes/polling/ucd-diskio.inc.php @@ -32,7 +32,6 @@ if(mysql_affected_rows()) { if($debug) { echo("$rrd "); } if (!is_file($rrd)) { - rrdtool_create ($rrd, "--step 300 \ DS:read:DERIVE:600:0:125000000000 \ DS:written:DERIVE:600:0:125000000000 \ diff --git a/includes/rrdtool.inc.php b/includes/rrdtool.inc.php index d0888841d..051b4e307 100644 --- a/includes/rrdtool.inc.php +++ b/includes/rrdtool.inc.php @@ -7,7 +7,14 @@ function rrdtool_update($rrdfile, $rrdupdate) function rrdtool_create($rrdfile, $rrdupdate) { - return rrdtool("create", $rrdfile, $rrdupdate); + global $config; global $debug; + + $command = $config['rrdtool'] . " create $rrdfile $rrdupdate"; + + if ($debug || TRUE) { echo($command."\n"); } + + return shell_exec($command); + } function rrdtool_fetch($rrdfile, $rrdupdate) @@ -40,7 +47,7 @@ function rrdtool($command, $file, $options) $command .= " --daemon " . $config['rrdcached']; } - if ($debug) { echo($command."\n"); } + if ($debug || TRUE) { echo($command."\n"); } return shell_exec($command); }