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