use rrdtool_update() everywhere instead of single rrdtool update lines, remove some dead code, and a bunch of coding style cleanups..

git-svn-id: http://www.observium.org/svn/observer/trunk@780 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-07 22:39:02 +00:00
parent d1d00ffb12
commit e77c976670
4 changed files with 139 additions and 103 deletions
@@ -68,7 +68,6 @@ while ($acc = mysql_fetch_array($mac_accounting_query)) {
RRA:MAX:0.5:288:797");
}
$woo = "N:".($b_in+0).":".($b_out+0).":".($p_in+0).":".($p_out+0);
if($debug) {echo("\n rrdtool update $rrdfile $woo");}
$ret = rrdtool_update("$rrdfile", $woo);
if ($update) { /// Do Updates
+1 -1
View File
@@ -45,7 +45,7 @@
RRA:MAX:0.5:288:2000`;
}
`rrdtool update $cpurrd N:$cpu5s:$cpu5m`;
rrdtool_update($cpurrd, "N:$cpu5s:$cpu5m");
include("includes/polling/cisco-processors.inc.php");
include("includes/polling/cisco-mempool.inc.php");
+1 -4
View File
@@ -34,10 +34,7 @@ while($temperature = mysql_fetch_array($temp_data)) {
echo($temp . "C\n");
$updatecmd = "rrdtool update $temprrd N:$temp";
if ($debug) { echo "$updatecmd\n"; }
shell_exec($updatecmd);
rrdtool_update($temprrd,"N:$temp");
if($temperature['temp_current'] < $temperature['temp_limit'] && $temp >= $temperature['temp_limit']) {
$updated = ", `service_changed` = '" . time() . "' ";