mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Add PHP CS Fixer Based on https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 * Apply PHP CS
14 lines
488 B
PHP
14 lines
488 B
PHP
<?php
|
|
|
|
if (! is_array($storage_cache['zpool'])) {
|
|
$storage_cache['zpool'] = snmpwalk_cache_oid($device, 'zpoolTable', null, 'FREENAS-MIB');
|
|
d_echo($storage_cache);
|
|
}
|
|
|
|
foreach ($storage_cache['zpool'] as $index => $entry) {
|
|
$storage['units'] = $entry['zpoolAllocationUnits'];
|
|
$storage['size'] = ($entry['zpoolSize'] * $storage['units']);
|
|
$storage['free'] = ($entry['zpoolAvailable'] * $storage['units']);
|
|
$storage['used'] = ($storage['size'] - $storage['free']);
|
|
}
|