many small fixes, hacky way to ignore no more variables, fix up supermicro sensor limits, loosen automatic sensor limit settings a bit

git-svn-id: http://www.observium.org/svn/observer/trunk@1675 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-08-13 13:17:53 +00:00
parent 61412a70f1
commit a1bf48e63e
9 changed files with 31 additions and 18 deletions

View File

@@ -74,8 +74,20 @@ function snmp_walk($device, $oid, $options = NULL, $mib = NULL, $mibdir = NULL)
$runtime_stats['snmpwalk']++;
if($debug) { echo("$data\n"); }
if (is_string($data) && (preg_match("/No Such (Object|Instance)/i", $data)))
## || preg_match("/No more variables left/i", $data)))
{ $data = false; } else { return $data; }
{
$data = false;
}
else
{
if (preg_match("/No more variables left in this MIB View \(It is past the end of the MIB tree\)$/",$data))
{
# Bit ugly :-(
$d_ex = explode("\n",$data);
unset($d_ex[count($d_ex)-1]);
$data = implode("\n",$d_ex);
}
return $data;
}
}
function snmpwalk_cache_cip($device, $oid, $array, $mib = 0)