mirror of
https://github.com/Cacti/cacti.git
synced 2026-12-05 22:54:19 +09:00
output of RRD output to logfile
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@2076 860744bd-22fc-0310-8c96-e9fe5004b5ca
This commit is contained in:
1 parent
2d8179ad66
commit
c8f105a663
1 file changed
+12
-1
+12
-1
@@ -132,6 +132,10 @@ function rrdtool_execute($command_line, $log_to_stdout, $output_flag, $rrd_struc
|
||||
$line .= fgets($fp, 4096);
|
||||
}
|
||||
|
||||
if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_HIGH) {
|
||||
cacti_log("RRDTOOL: " . $line);
|
||||
}
|
||||
|
||||
return $line;
|
||||
/* stdin rrdtool pipe; read 1024 bytes and stop */
|
||||
}else{
|
||||
@@ -139,7 +143,14 @@ function rrdtool_execute($command_line, $log_to_stdout, $output_flag, $rrd_struc
|
||||
$fp = rrd_get_fd($rrd_struc, RRDTOOL_PIPE_CHILD_WRITE);
|
||||
}
|
||||
|
||||
return fgets($fp, 1024);
|
||||
$line = fgets($fp, 1024);
|
||||
fflush(rrd_get_fd($rrd_struc, RRDTOOL_PIPE_CHILD_WRITE));
|
||||
|
||||
if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_HIGH) {
|
||||
cacti_log("RRDTOOL: " . $line);
|
||||
}
|
||||
|
||||
return $line;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user