no rrdcached for create !

git-svn-id: http://www.observium.org/svn/observer/trunk@1456 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-21 18:29:04 +00:00
parent 6bb7fe026f
commit df34132661
2 changed files with 9 additions and 3 deletions

View File

@@ -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 \

View File

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