Move mempool polling scripts into their own directory. add Juniper ScreenOS CPU/Memory hardcoded discovery/poller

git-svn-id: http://www.observium.org/svn/observer/trunk@1467 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-23 18:15:54 +00:00
parent 4343c41f28
commit 538e96462f
11 changed files with 52 additions and 48 deletions

View File

@@ -0,0 +1,17 @@
<?php
/// HOST-RESOURCES-MIB - Memory Objects
if(!is_array($storage_cache['hrstorage'])) {
$storage_cache['hrstorage'] = snmpwalk_cache_oid($device, "hrStorageEntry", NULL, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES");
if ($debug) { print_r($storage_cache); }
} else { if($debug) { echo("Cached!"); } }
$entry = $storage_cache['hrstorage'][$device[device_id]][$mempool[mempool_index]];
$mempool['units'] = $entry['hrStorageAllocationUnits'];
$mempool['used'] = $entry['hrStorageUsed'] * $mempool['units'];
$mempool['total'] = $entry['hrStorageSize'] * $mempool['units'];
$mempool['free'] = $mempool['total'] - $mempool['used'];
?>