mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix rrdcached (thanks to Mickael Marchand)
git-svn-id: http://www.observium.org/svn/observer/trunk@2505 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,12 +7,7 @@ function rrdtool_graph($graph_file, $options)
|
||||
|
||||
if($debug) { echo("$options"); }
|
||||
|
||||
if ($config['rrdcached'])
|
||||
{
|
||||
$command = $config['rrdtool'] . " --daemon " . $config['rrdcached'] . " -";
|
||||
} else {
|
||||
$command = $config['rrdtool'] . " -";
|
||||
}
|
||||
|
||||
$descriptorspec = array(
|
||||
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
|
||||
@@ -31,7 +26,12 @@ function rrdtool_graph($graph_file, $options)
|
||||
// 1 => readable handle connected to child stdout
|
||||
// Any error output will be appended to /tmp/error-output.txt
|
||||
|
||||
if ($config['rrdcached']) {
|
||||
fwrite($pipes[0], "graph --daemon " . $config['rrdcached'] . " $graph_file $options");
|
||||
} else {
|
||||
fwrite($pipes[0], "graph $graph_file $options");
|
||||
}
|
||||
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
|
||||
|
Reference in New Issue
Block a user