1 | <?php |
||
2 | /* |
||
3 | * Copyright (c) 2019 David Leselidze <[email protected]> |
||
4 | * This program is free software: you can redistribute it and/or modify it |
||
5 | * under the terms of the GNU General Public License as published by the |
||
6 | * Free Software Foundation, either version 3 of the License, or (at your |
||
7 | * option) any later version. Please see LICENSE.txt at the top level of |
||
8 | * the source code distribution for details. |
||
9 | */ |
||
10 | |||
11 | $aix_filesystem = snmpwalk_cache_oid($device, 'aixFsTableEntry', [], 'IBM-AIX-MIB'); |
||
12 | |||
13 | if (is_array($aix_filesystem)) { |
||
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
14 | echo 'aix_filesystem : '; |
||
15 | foreach ($aix_filesystem as $aix_fs) { |
||
16 | if (isset($aix_fs['aixFsMountPoint'])) { |
||
17 | if ($aix_fs['aixFsType'] == 'jfs' || $aix_fs['aixFsType'] == 'jfs2') { // Only JFS or JFS2 |
||
18 | $aix_fs['aixFsSize'] = $aix_fs['aixFsSize'] * 1024 * 1024; |
||
19 | $aix_fs['aixFsFree'] = $aix_fs['aixFsFree'] * 1024 * 1024; |
||
20 | $aix_fs['aixFsUsed'] = $aix_fs['aixFsSize'] - $aix_fs['aixFsFree']; |
||
21 | |||
22 | discover_storage($valid_storage, $device, $aix_fs['aixFsIndex'], 'aixFileSystem', 'aix', $aix_fs['aixFsMountPoint'], $aix_fs['aixFsSize'], 1024 * 1024, $aix_fs['aixFsUsed']); |
||
23 | } |
||
24 | } |
||
25 | } // end foreach |
||
26 | } // endif |
||
27 | unset($aix_fs); |
||
28 |