mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@938 61d68cd4-352d-0410-923a-c4978735b2b8
20 lines
597 B
PHP
Executable File
20 lines
597 B
PHP
Executable File
<?php
|
|
|
|
/// HOST-RESOURCES-MIB - Storage Objects
|
|
|
|
if(!is_array($storage_cache['hrstorage'])) {
|
|
$storage_cache['hrstorage'] = snmp_cache_oid("hrStorageEntry", $device, array(), "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES");
|
|
print_r($storage_cache);
|
|
}
|
|
|
|
$entry = $storage_cache['hrstorage'][$device[device_id]][$storage[storage_index]];
|
|
|
|
print_r($entry);
|
|
|
|
$storage['units'] = $entry['hrStorageAllocationUnits'];
|
|
$storage['used'] = $entry['hrStorageUsed'] * $storage['units'];
|
|
$storage['size'] = $entry['hrStorageSize'] * $storage['units'];
|
|
$storage['free'] = $storage['size'] - $storage['used'];
|
|
|
|
?>
|