mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Attempt to speed up SNMP port polling
This commit is contained in:
@@ -111,7 +111,8 @@ $pagp_oids = array(
|
|||||||
$ifmib_oids = array_merge($data_oids, $stat_oids);
|
$ifmib_oids = array_merge($data_oids, $stat_oids);
|
||||||
|
|
||||||
$ifmib_oids = array(
|
$ifmib_oids = array(
|
||||||
'ifEntry',
|
//'ifEntry',
|
||||||
|
'ifDescr',
|
||||||
'ifXEntry',
|
'ifXEntry',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -121,6 +122,10 @@ foreach ($ifmib_oids as $oid) {
|
|||||||
$port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, 'IF-MIB');
|
$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']) {
|
if ($config['enable_ports_etherlike']) {
|
||||||
echo 'dot3Stats ';
|
echo 'dot3Stats ';
|
||||||
$port_stats = snmpwalk_cache_oid($device, 'dot3StatsEntry', $port_stats, 'EtherLike-MIB');
|
$port_stats = snmpwalk_cache_oid($device, 'dot3StatsEntry', $port_stats, 'EtherLike-MIB');
|
||||||
|
Reference in New Issue
Block a user