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); }