mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
14 lines
460 B
PHP
14 lines
460 B
PHP
![]() |
<?php
|
||
|
|
||
|
if (!is_array($storage_cache['dsk'])) {
|
||
|
$storage_cache['dsk'] = snmpwalk_cache_oid($device, 'dskTable', null, 'UCD-SNMP-MIB');
|
||
|
d_echo($storage_cache);
|
||
|
}
|
||
|
|
||
|
$entry = $storage_cache['dsk'][$storage[storage_index]];
|
||
|
|
||
|
$storage['units'] = 1024;
|
||
|
$storage['size'] = ($entry['dskTotal'] * $storage['units']);
|
||
|
$storage['free'] = ($entry['dskAvail'] * $storage['units']);
|
||
|
$storage['used'] = ($storage['size'] - $storage['free']);
|