Attempt to speed up SNMP port polling

This commit is contained in:
Dave Bell
2016-06-13 14:58:49 +01:00
parent 779c4dee71
commit 6552c43689

View File

@@ -111,7 +111,8 @@ $pagp_oids = array(
$ifmib_oids = array_merge($data_oids, $stat_oids);
$ifmib_oids = array(
'ifEntry',
//'ifEntry',
'ifDescr',
'ifXEntry',
);
@@ -121,6 +122,10 @@ foreach ($ifmib_oids as $oid) {
$port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, 'IF-MIB');
}
if (!isset($port_stats[1]['ifHCInOctets']) && !is_numeric($port_stats[1]['ifHCInOctets'])) {
$port_stats = snmpwalk_cache_oid($device, 'ifEntry', $port_stats, 'IF-MIB');
}
if ($config['enable_ports_etherlike']) {
echo 'dot3Stats ';
$port_stats = snmpwalk_cache_oid($device, 'dot3StatsEntry', $port_stats, 'EtherLike-MIB');