1 | <?php |
||
2 | |||
3 | $dsktable_array = snmpwalk_cache_oid($device, 'dskTable', null, 'UCD-SNMP-MIB'); |
||
4 | |||
5 | $sql = "SELECT `storage_descr` FROM `storage` WHERE `device_id` = '" . $device['device_id'] . "' AND `storage_type` != 'dsk'"; |
||
6 | $tmp_storage = dbFetchColumn($sql); |
||
7 | |||
8 | if (is_array($dsktable_array)) { |
||
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
9 | foreach ($dsktable_array as $dsk) { |
||
10 | if (isset($dsk['dskPath'])) { |
||
11 | if (! in_array($dsk['dskPath'], $tmp_storage)) { |
||
12 | $dsk['dskTotal'] = $dsk['dskTotal'] * 1024; |
||
13 | $dsk['dskAvail'] = ($entry['dskAvail'] * 1024); |
||
14 | $dsk['dskUsed'] = $dsk['dskTotal'] - $dsk['dskAvail']; |
||
15 | |||
16 | discover_storage($valid_storage, $device, $dsk['dskIndex'], 'dsk', 'ucd-dsktable', $dsk['dskPath'], $dsk['dskTotal'], 1024, $dsk['dskUsed']); |
||
17 | } |
||
18 | } |
||
19 | } |
||
20 | } |
||
21 |