mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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() . "' ";
|
||||
|
||||
Reference in New Issue
Block a user