2010-03-14 13:50:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/// HOST-RESOURCES-MIB - Memory Objects
|
|
|
|
|
|
|
|
if(!is_array($storage_cache['hrstorage'])) {
|
|
|
|
$storage_cache['hrstorage'] = snmp_cache_oid("hrStorageEntry", $device, array(), "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES");
|
|
|
|
if ($debug) { print_r($storage_cache); }
|
|
|
|
} else { if($debug) { echo("Cached!"); } }
|
|
|
|
|
2010-03-14 14:38:30 +00:00
|
|
|
$entry = $storage_cache['hrstorage'][$device[device_id]][$mempool[mempool_index]];
|
2010-03-14 13:50:14 +00:00
|
|
|
|
|
|
|
$mempool['units'] = $entry['hrStorageAllocationUnits'];
|
|
|
|
$mempool['used'] = $entry['hrStorageUsed'] * $mempool['units'];
|
|
|
|
$mempool['total'] = $entry['hrStorageSize'] * $mempool['units'];
|
|
|
|
$mempool['free'] = $mempool['total'] - $mempool['used'];
|
|
|
|
|
|
|
|
?>
|