fix Novel Netware memory/storage detection (missing storage for now, but atleast memory is in the memory section, not storage!)

git-svn-id: http://www.observium.org/svn/observer/trunk@2156 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-24 12:43:03 +00:00
parent 0242ba34a9
commit 9c2c396d73
4 changed files with 1148 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
global $valid_mempool;
$storage_array = snmpwalk_cache_oid($device, "hrStorageEntry", NULL, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES");
$storage_array = snmpwalk_cache_oid($device, "hrStorageEntry", NULL, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES:NetWare-Host-Ext-MIB");
if (is_array($storage_array))
{
@@ -16,7 +16,26 @@ if (is_array($storage_array))
$units = $storage['hrStorageAllocationUnits'];
$deny = 1;
if ($fstype == "hrStorageVirtualMemory" || $fstype == "hrStorageRam") { $deny = 0; }
switch($fstype)
{
case 'hrStorageVirtualMemory':
case 'hrStorageRam';
case 'nwhrStorageDOSMemory';
case 'nwhrStorageMemoryAlloc';
case 'nwhrStorageMemoryPermanent';
case 'nwhrStorageMemoryAlloc';
case 'nwhrStorageCacheBuffers';
case 'nwhrStorageCacheMovable';
case 'nwhrStorageCacheNonMovable';
case 'nwhrStorageCodeAndDataMemory';
case 'nwhrStorageDOSMemory';
case 'nwhrStorageIOEngineMemory';
case 'nwhrStorageMSEngineMemory';
case 'nwhrStorageUnclaimedMemory';
$deny = 0;
break;
}
if ($device['os'] == "routeros" && $descr == "main memory") { $deny = 0; }
if (strstr($descr, "MALLOC") || strstr($descr, "UMA")) { $deny = 1; } ## Ignore FreeBSD INSANITY
@@ -34,4 +53,4 @@ if (is_array($storage_array))
unset($storage_array);
}
?>
?>