many polling and discovery performance improvements

git-svn-id: http://www.observium.org/svn/observer/trunk@408 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-04-24 15:04:45 +00:00
parent bc6ad69724
commit dde365e30c
21 changed files with 75 additions and 124 deletions
+3 -3
View File
@@ -4,8 +4,8 @@ $query = "SELECT * FROM temperature WHERE temp_host = '" . $device['device_id']
$temp_data = mysql_query($query);
while($temperature = mysql_fetch_array($temp_data)) {
$temp_cmd = "snmpget -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " " . $temperature['temp_oid'];
$temp = `$temp_cmd`;
$temp_cmd = $config['snmpget'] . " -m SNMPv2-MIB-O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " " . $temperature['temp_oid'];
$temp = shell_exec($temp_cmd);
echo("Checking temp " . $temperature['temp_descr'] . "... ");
@@ -30,7 +30,7 @@ while($temperature = mysql_fetch_array($temp_data)) {
$updatecmd = "rrdtool update $temprrd N:$temp";
`$updatecmd`;
shell_exec($updatecmd);
if($temperature['temp_current'] < $temperature['temp_limit'] && $temp >= $temperature['temp_limit']) {
$updated = ", `service_changed` = '" . time() . "' ";