Tony Murray 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00

17 lines
599 B
PHP

<?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');
d_echo($storage_cache);
} else {
d_echo('Cached!');
}
$entry = $storage_cache['hrstorage'][$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']);