0) { // Use new OIDs $hc = 1; // This is fake HC bit. } else { // Use old deprecated OIDs $hc = 0; $percent = snmp_get_oid($device, 'snAgGblDynMemUtil.0', $mib); $total = snmp_get_oid($device, 'snAgGblDynMemTotal.0', $mib); if ($total == -1 && is_numeric($total)) { $total = 100; } } if (is_numeric($percent) && is_numeric($total) && $total > 0) { $used = $total * $percent / 100; discover_mempool($valid['mempool'], $device, 0, 'FOUNDRY-SN-AGENT-MIB', 'Memory', 1, $total, $used, $hc); } unset ($total, $used, $percent, $hc); // EOF