feature: Optional partial port polling (#5805)

* feature: Added ability to switch port polling mode

* update, speed things up slightly by walking certain tables

* more fixes

* updates

* updates

* update to exclude ports that are down

* wrong variable used

* update to set previous port status when null

* small update to port disco
This commit is contained in:
Neil Lathwood
2017-02-14 23:26:07 +00:00
committed by Tony Murray
parent 8787d9d902
commit cc51a68f85
5 changed files with 134 additions and 16 deletions

View File

@ -184,7 +184,7 @@ function gen_snmp_cmd($cmd, $device, $oids, $options = null, $mib = null, $mibdi
return $cmd;
} // end gen_snmp_cmd()
function snmp_get_multi($device, $oids, $options = '-OQUs', $mib = null, $mibdir = null)
function snmp_get_multi($device, $oids, $options = '-OQUs', $mib = null, $mibdir = null, $array = array())
{
$time_start = microtime(true);
@ -195,8 +195,6 @@ function snmp_get_multi($device, $oids, $options = '-OQUs', $mib = null, $mibdir
$cmd = gen_snmpget_cmd($device, $oids, $options, $mib, $mibdir);
$data = trim(external_exec($cmd));
$array = array();
foreach (explode("\n", $data) as $entry) {
list($oid,$value) = explode('=', $entry, 2);
$oid = trim($oid);