mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
24 lines
958 B
PHP
24 lines
958 B
PHP
|
<?php
|
||
|
|
||
|
# NETSWITCH-MIB::hpGlobalMemSlotIndex.1 = INTEGER: 1
|
||
|
# NETSWITCH-MIB::hpGlobalMemSlabCnt.1 = Counter32: 3966
|
||
|
# NETSWITCH-MIB::hpGlobalMemFreeSegCnt.1 = Counter32: 166
|
||
|
# NETSWITCH-MIB::hpGlobalMemAllocSegCnt.1 = Counter32: 3803
|
||
|
# NETSWITCH-MIB::hpGlobalMemTotalBytes.1 = INTEGER: 11337704
|
||
|
# NETSWITCH-MIB::hpGlobalMemFreeBytes.1 = INTEGER: 9669104
|
||
|
# NETSWITCH-MIB::hpGlobalMemAllocBytes.1 = INTEGER: 1668728
|
||
|
|
||
|
if(!is_array($mempool_cache['hpGlobal'])) {
|
||
|
$mempool_cache['hpGlobal'] = snmpwalk_cache_oid($device, "hpGlobal", NULL, "NETSWITCH-MIB", $config['mibdir'].":".$config['mibdir']."/hp");
|
||
|
if ($debug) { print_r($mempool_cache); }
|
||
|
} else { if($debug) { echo("Cached!"); } }
|
||
|
|
||
|
$entry = $mempool_cache['hpGlobal'][$device[device_id]][$mempool[mempool_index]];
|
||
|
|
||
|
$mempool['units'] = "1";
|
||
|
$mempool['used'] = $entry['hpGlobalMemAllocBytes'];
|
||
|
$mempool['total'] = $entry['hpGlobalMemTotalBytes'];
|
||
|
$mempool['free'] = $entry['hpGlobalMemFreeBytes'];
|
||
|
|
||
|
?>
|