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
+2 -7
View File
@@ -67,17 +67,12 @@ function getDates($dayofmonth) {
function getValue($host, $community, $port, $id, $inout) {
global $config;
$oid = "IF-MIB::ifHC" . $inout . "Octets." . $id;
$value = `snmpget -c $community -v2c -O qv $host:$port $oid`;
$value = shell_exec($config['snmpget'] ." -m IF-MIB -c $community -v2c -O qv $host:$port $oid");
return $value;
}
function getIfName($host, $port, $id) {
$oid = "IF-MIB::ifDescr." . $id;
$value = `snmpget -c xyyz -v2c -O qv $host:$port $oid`;
return $value;
}
function getLastPortCounter($port_id,$inout) {
$query = mysql_query("SELECT count(counter) from port_" . $inout . "_measurements WHERE port_id=" . $port_id);
$rows = mysql_result($query, 0);