mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user