git-svn-id: http://www.observium.org/svn/observer/trunk@98 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-05-20 19:21:35 +00:00
parent edb99764fb
commit ad4160c2ea
16 changed files with 275 additions and 96 deletions
+4 -5
View File
@@ -8,11 +8,9 @@ while($temperature = mysql_fetch_array($temp_data)) {
echo($temp_cmd);
$temp = `$temp_cmd`;
$temprrd = "rrd/" . $device[hostname] . "-temp-" . $temperature[temp_id] . ".rrd";
$temprrdold = "rrd/" . $device[hostname] . "-temp" . $temperature[temp_id] . ".rrd";
if (is_file($temprrdold)) {
rename($temprrdold, $temprrd);
}
$temprrd = "rrd/" . $device[hostname] . "-temp-" . str_replace(" ", "_",$temperature['temp_descr']) . ".rrd";
if (!is_file($temprrd)) {
`rrdtool create $temprrd \
@@ -25,6 +23,7 @@ while($temperature = mysql_fetch_array($temp_data)) {
}
$temp = str_replace("\"", "", $temp);
if($temperature['temp_tenths']) { $temp = $temp / 10; }
echo("$temprrd, N:$temp");
`rrdtool update $temprrd N:$temp`;