2010-03-11 02:53:17 +00:00
|
|
|
<?php
|
|
|
|
|
2010-07-29 18:25:11 +00:00
|
|
|
global $valid_mempool;
|
|
|
|
|
2011-03-14 19:24:23 +00:00
|
|
|
if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
|
|
|
{
|
2010-03-11 02:53:17 +00:00
|
|
|
echo("CISCO-ENHANCED-MEMORY-POOL: ");
|
|
|
|
|
2010-05-03 00:17:38 +00:00
|
|
|
$array = snmpwalk_cache_multi_oid($device, "cempMemPoolEntry", NULL, "CISCO-ENHANCED-MEMPOOL-MIB");
|
2010-03-11 02:53:17 +00:00
|
|
|
|
2011-03-14 19:24:23 +00:00
|
|
|
if (is_array($array))
|
|
|
|
{
|
|
|
|
foreach ($array as $index => $entry)
|
|
|
|
{
|
|
|
|
if (is_numeric($entry['cempMemPoolUsed']) && $entry['cempMemPoolValid'] == "true")
|
|
|
|
{
|
|
|
|
list($entPhysicalIndex) = explode(".", $index);
|
2011-04-04 09:52:09 +00:00
|
|
|
$entPhysicalName = snmp_get($device, "entPhysicalName.".$entPhysicalIndex, "-Oqv", "ENTITY-MIB");
|
|
|
|
|
|
|
|
$descr = $entPhysicalName." - ".$entry['cempMemPoolName'];
|
2010-03-12 17:18:04 +00:00
|
|
|
|
2011-03-14 19:24:23 +00:00
|
|
|
$descr = str_replace("Cisco ", "", $descr);
|
|
|
|
$descr = str_replace("Network Processing Engine", "", $descr);
|
2010-03-12 17:18:04 +00:00
|
|
|
|
2011-03-14 19:24:23 +00:00
|
|
|
discover_mempool($valid_mempool, $device, $index, "cemp", $descr, "1", $entPhysicalIndex, NULL);
|
2010-03-11 02:53:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-04 09:52:09 +00:00
|
|
|
?>
|