mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* refactor: Centralize MIB include directory specification The default is now: ``` $config['mib_dir'].'/mibdirname:'.$config['mib_dir'] ``` This means we exclude OS mibs and only use ours (we could prepend `+` if we want to include os mibs. All snmp calls should only include the name of the subdirectory under the mibs directory. * Remove d_echo from Proc Fix snmpsim tests.
23 lines
864 B
PHP
23 lines
864 B
PHP
<?php
|
|
|
|
// NETSWITCH-MIB::hpLocalMemSlotIndex.1 = INTEGER: 1
|
|
// NETSWITCH-MIB::hpLocalMemSlabCnt.1 = Counter32: 3966
|
|
// NETSWITCH-MIB::hpLocalMemFreeSegCnt.1 = Counter32: 166
|
|
// NETSWITCH-MIB::hpLocalMemAllocSegCnt.1 = Counter32: 3803
|
|
// NETSWITCH-MIB::hpLocalMemTotalBytes.1 = INTEGER: 11337704
|
|
// NETSWITCH-MIB::hpLocalMemFreeBytes.1 = INTEGER: 9669104
|
|
// NETSWITCH-MIB::hpLocalMemAllocBytes.1 = INTEGER: 1668728
|
|
if (!is_array($mempool_cache['hpLocal'])) {
|
|
$mempool_cache['hpLocal'] = snmpwalk_cache_oid($device, 'hpLocal', null, 'NETSWITCH-MIB', 'hp');
|
|
d_echo($mempool_cache);
|
|
} else {
|
|
d_echo('Cached!');
|
|
}
|
|
|
|
$entry = $mempool_cache['hpLocal'][$mempool[mempool_index]];
|
|
|
|
$mempool['units'] = '1';
|
|
$mempool['used'] = $entry['hpLocalMemAllocBytes'];
|
|
$mempool['total'] = $entry['hpLocalMemTotalBytes'];
|
|
$mempool['free'] = $entry['hpLocalMemFreeBytes'];
|