Subversion Repositories ALCASAR

Rev

Rev 2770 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2770 Rev 3037
1
<?php
1
<?php
2
/**
2
/**
3
 * IBM AIX System Class
3
 * IBM AIX System Class
4
 *
4
 *
5
 * PHP version 5
5
 * PHP version 5
6
 *
6
 *
7
 * @category  PHP
7
 * @category  PHP
8
 * @package   PSI AIX OS class
8
 * @package   PSI AIX OS class
9
 * @author    Krzysztof Paz (kpaz@gazeta.pl) based on HPUX of Michael Cramer <BigMichi1@users.sourceforge.net>
9
 * @author    Krzysztof Paz (kpaz@gazeta.pl) based on HPUX of Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2011 Krzysztof Paz
10
 * @copyright 2011 Krzysztof Paz
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
12
 * @version   SVN: $Id: class.AIX.inc.php 287 2009-06-26 12:11:59Z Krzysztof Paz, IBM POLSKA
12
 * @version   SVN: $Id: class.AIX.inc.php 287 2009-06-26 12:11:59Z Krzysztof Paz, IBM POLSKA
13
 * @link      http://phpsysinfo.sourceforge.net
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
14
 */
15
/**
15
/**
16
* IBM AIX sysinfo class
16
* IBM AIX sysinfo class
17
* get all the required information from IBM AIX system
17
* get all the required information from IBM AIX system
18
*
18
*
19
* @category  PHP
19
* @category  PHP
20
* @package   PSI AIX OS class
20
* @package   PSI AIX OS class
21
* @author    Krzysztof Paz (kpaz@gazeta.pl) based on Michael Cramer <BigMichi1@users.sourceforge.net>
21
* @author    Krzysztof Paz (kpaz@gazeta.pl) based on Michael Cramer <BigMichi1@users.sourceforge.net>
22
* @copyright 2011 Krzysztof Paz
22
* @copyright 2011 Krzysztof Paz
23
* @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
23
* @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
24
* @version   Release: 3.0
24
* @version   Release: 3.0
25
* @link      http://phpsysinfo.sourceforge.net
25
* @link      http://phpsysinfo.sourceforge.net
26
*/
26
*/
27
class AIX extends OS
27
class AIX extends OS
28
{
28
{
-
 
29
    /**
-
 
30
     * uptime command result.
-
 
31
     */
-
 
32
    private $_uptime = null;
29
 
33
 
-
 
34
    /**
-
 
35
     * prtconf command result.
-
 
36
     */
30
    private $_aixdata = array();
37
    private $_aixdata = array();
31
 
38
 
32
    /**
39
    /**
33
     * Virtual Host Name
40
     * Virtual Host Name
34
     * @return void
41
     * @return void
35
     */
42
     */
36
    private function _hostname()
43
    private function _hostname()
37
    {
44
    {
38
        /*   if (PSI_USE_VHOST === true) {
45
        /*   if (PSI_USE_VHOST) {
39
               if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
46
               if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
40
           } else {
47
           } else {
41
               if (CommonFunctions::executeProgram('hostname', '', $ret)) {
48
               if (CommonFunctions::executeProgram('hostname', '', $ret)) {
42
                   $this->sys->setHostname($ret);
49
                   $this->sys->setHostname($ret);
43
               }
50
               }
44
           } */
51
           } */
45
        if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
52
        if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
46
 
53
 
47
    }
54
    }
48
 
55
 
49
    /**
56
    /**
50
     * IBM AIX Version
57
     * IBM AIX Version
51
     * @return void
58
     * @return void
52
     */
59
     */
53
    private function _kernel()
60
    private function _kernel()
54
    {
61
    {
55
        if (CommonFunctions::executeProgram('oslevel', '', $ret1) && CommonFunctions::executeProgram('oslevel', '-s', $ret2)) {
62
        if (CommonFunctions::executeProgram('oslevel', '', $ret1) && CommonFunctions::executeProgram('oslevel', '-s', $ret2)) {
56
            $this->sys->setKernel($ret1 . '   (' . $ret2 . ')');
63
            $this->sys->setKernel($ret1 . '   (' . $ret2 . ')');
57
        }
64
        }
58
    }
65
    }
59
 
66
 
60
    /**
67
    /**
61
     * UpTime
68
     * UpTime
62
     * time the system is running
69
     * time the system is running
63
     * @return void
70
     * @return void
64
     */
71
     */
65
    private function _uptime()
72
    private function _uptime()
66
    {
73
    {
67
        if (CommonFunctions::executeProgram('uptime', '', $buf)) {
74
        if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
68
            if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
75
            if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $this->_uptime, $ar_buf)) {
69
                $min = $ar_buf[3];
76
                $min = $ar_buf[3];
70
                $hours = $ar_buf[2];
77
                $hours = $ar_buf[2];
71
                $days = $ar_buf[1];
78
                $days = $ar_buf[1];
72
                $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);
79
                $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);
73
            }
80
            }
74
        }
81
        }
75
    }
82
    }
76
 
83
 
77
    /**
84
    /**
78
     * Processor Load
85
     * Processor Load
79
     * optionally create a loadbar
86
     * optionally create a loadbar
80
     * @return void
87
     * @return void
81
     */
88
     */
82
    private function _loadavg()
89
    private function _loadavg()
83
    {
90
    {
84
        if (CommonFunctions::executeProgram('uptime', '', $buf)) {
91
        if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
85
            if (preg_match("/average: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
92
            if (preg_match("/average: (.*), (.*), (.*)$/", $this->_uptime, $ar_buf)) {
86
                $this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
93
                $this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
87
            }
94
            }
88
        }
95
        }
89
    }
96
    }
90
 
97
 
91
    /**
98
    /**
92
     * CPU information
99
     * CPU information
93
     * All of the tags here are highly architecture dependant
100
     * All of the tags here are highly architecture dependant
94
     * @return void
101
     * @return void
95
     */
102
     */
96
    private function _cpuinfo()
103
    private function _cpuinfo()
97
    {
104
    {
98
        $ncpu = 0;
105
        $ncpu = 0;
99
        $tcpu = "";
106
        $tcpu = "";
100
        $vcpu = "";
107
        $vcpu = "";
101
        $ccpu = "";
108
        $ccpu = "";
102
        $scpu = "";
109
        $scpu = "";
103
        foreach ($this->readaixdata() as $line) {
110
        foreach ($this->readaixdata() as $line) {
104
            if (preg_match("/^Number Of Processors:\s+(\d+)/", $line, $ar_buf)) {
111
            if (preg_match("/^Number Of Processors:\s+(\d+)/", $line, $ar_buf)) {
105
                $ncpu = $ar_buf[1];
112
                $ncpu = $ar_buf[1];
106
            }
113
            }
107
            if (preg_match("/^Processor Type:\s+(.+)/", $line, $ar_buf)) {
114
            if (preg_match("/^Processor Type:\s+(.+)/", $line, $ar_buf)) {
108
                $tcpu = $ar_buf[1];
115
                $tcpu = $ar_buf[1];
109
            }
116
            }
110
            if (preg_match("/^Processor Version:\s+(.+)/", $line, $ar_buf)) {
117
            if (preg_match("/^Processor Version:\s+(.+)/", $line, $ar_buf)) {
111
                $vcpu = $ar_buf[1];
118
                $vcpu = $ar_buf[1];
112
            }
119
            }
113
            if (preg_match("/^CPU Type:\s+(.+)/", $line, $ar_buf)) {
120
            if (preg_match("/^CPU Type:\s+(.+)/", $line, $ar_buf)) {
114
                $ccpu = $ar_buf[1];
121
                $ccpu = $ar_buf[1];
115
            }
122
            }
116
            if (preg_match("/^Processor Clock Speed:\s+(\d+)\s/", $line, $ar_buf)) {
123
            if (preg_match("/^Processor Clock Speed:\s+(\d+)\s/", $line, $ar_buf)) {
117
                $scpu = $ar_buf[1];
124
                $scpu = $ar_buf[1];
118
            }
125
            }
119
        }
126
        }
120
        for ($i = 0; $i < $ncpu; $i++) {
127
        for ($i = 0; $i < $ncpu; $i++) {
121
            $dev = new CpuDevice();
128
            $dev = new CpuDevice();
122
            if (trim($tcpu) != "") {
129
            if (trim($tcpu) != "") {
123
                $cpu = trim($tcpu);
130
                $cpu = trim($tcpu);
124
                if (trim($vcpu) != "") $cpu .= " ".trim($vcpu);
131
                if (trim($vcpu) != "") $cpu .= " ".trim($vcpu);
125
                if (trim($ccpu) != "") $cpu .= " ".trim($ccpu);
132
                if (trim($ccpu) != "") $cpu .= " ".trim($ccpu);
126
                $dev->setModel($cpu);
133
                $dev->setModel($cpu);
127
            }
134
            }
128
            if (trim($scpu) != "") {
135
            if (trim($scpu) != "") {
129
                $dev->setCpuSpeed(trim($scpu));
136
                $dev->setCpuSpeed(trim($scpu));
130
            }
137
            }
131
            $this->sys->setCpus($dev);
138
            $this->sys->setCpus($dev);
132
        }
139
        }
133
    }
140
    }
134
 
141
 
135
    /**
142
    /**
136
     * PCI devices
143
     * PCI devices
137
     * @return void
144
     * @return void
138
     */
145
     */
139
    private function _pci()
146
    private function _pci()
140
    {
147
    {
141
        foreach ($this->readaixdata() as $line) {
148
        foreach ($this->readaixdata() as $line) {
142
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*PCI.*)/", $line, $ar_buf)) {
149
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*PCI.*)/", $line, $ar_buf)) {
143
                $dev = new HWDevice();
150
                $dev = new HWDevice();
144
                $dev->setName(trim($ar_buf[1]));
151
                $dev->setName(trim($ar_buf[1]));
145
                $this->sys->setPciDevices($dev);
152
                $this->sys->setPciDevices($dev);
146
            }
153
            }
147
        }
154
        }
148
    }
155
    }
149
 
156
 
150
    /**
157
    /**
151
     * IDE devices
158
     * IDE devices
152
     * @return void
159
     * @return void
153
     */
160
     */
154
    private function _ide()
161
    private function _ide()
155
    {
162
    {
156
        foreach ($this->readaixdata() as $line) {
163
        foreach ($this->readaixdata() as $line) {
157
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*IDE.*)/", $line, $ar_buf)) {
164
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*IDE.*)/", $line, $ar_buf)) {
158
                $dev = new HWDevice();
165
                $dev = new HWDevice();
159
                $dev->setName(trim($ar_buf[1]));
166
                $dev->setName(trim($ar_buf[1]));
160
                $this->sys->setIdeDevices($dev);
167
                $this->sys->setIdeDevices($dev);
161
            }
168
            }
162
        }
169
        }
163
    }
170
    }
164
 
171
 
165
    /**
172
    /**
166
     * SCSI devices
173
     * SCSI devices
167
     * @return void
174
     * @return void
168
     */
175
     */
169
    private function _scsi()
176
    private function _scsi()
170
    {
177
    {
171
        foreach ($this->readaixdata() as $line) {
178
        foreach ($this->readaixdata() as $line) {
172
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*SCSI.*)/", $line, $ar_buf)) {
179
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*SCSI.*)/", $line, $ar_buf)) {
173
                $dev = new HWDevice();
180
                $dev = new HWDevice();
174
                $dev->setName(trim($ar_buf[1]));
181
                $dev->setName(trim($ar_buf[1]));
175
                $this->sys->setScsiDevices($dev);
182
                $this->sys->setScsiDevices($dev);
176
            }
183
            }
177
        }
184
        }
178
    }
185
    }
179
 
186
 
180
    /**
187
    /**
181
     * USB devices
188
     * USB devices
182
     * @return void
189
     * @return void
183
     */
190
     */
184
    private function _usb()
191
    private function _usb()
185
    {
192
    {
186
        foreach ($this->readaixdata() as $line) {
193
        foreach ($this->readaixdata() as $line) {
187
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*USB.*)/", $line, $ar_buf)) {
194
            if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*USB.*)/", $line, $ar_buf)) {
188
                $dev = new HWDevice();
195
                $dev = new HWDevice();
189
                $dev->setName(trim($ar_buf[1]));
196
                $dev->setName(trim($ar_buf[1]));
190
                $this->sys->setUsbDevices($dev);
197
                $this->sys->setUsbDevices($dev);
191
            }
198
            }
192
        }
199
        }
193
    }
200
    }
194
 
201
 
195
    /**
202
    /**
196
     * Network devices
203
     * Network devices
197
     * includes also rx/tx bytes
204
     * includes also rx/tx bytes
198
     * @return void
205
     * @return void
199
     */
206
     */
200
    private function _network()
207
    private function _network()
201
    {
208
    {
202
        if (CommonFunctions::executeProgram('netstat', '-ni | tail -n +2', $netstat)) {
209
        if (CommonFunctions::executeProgram('netstat', '-ni | tail -n +2', $netstat)) {
203
            $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
210
            $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
204
            foreach ($lines as $line) {
211
            foreach ($lines as $line) {
205
                $ar_buf = preg_split("/\s+/", $line);
212
                $ar_buf = preg_split("/\s+/", $line);
206
                if (! empty($ar_buf[0]) && ! empty($ar_buf[3])) {
213
                if (! empty($ar_buf[0]) && ! empty($ar_buf[3])) {
207
                    $dev = new NetDevice();
214
                    $dev = new NetDevice();
208
                    $dev->setName($ar_buf[0]);
215
                    $dev->setName($ar_buf[0]);
209
                    $dev->setRxBytes($ar_buf[4]);
216
                    $dev->setRxBytes($ar_buf[4]);
210
                    $dev->setTxBytes($ar_buf[6]);
217
                    $dev->setTxBytes($ar_buf[6]);
211
                    $dev->setErrors($ar_buf[5] + $ar_buf[7]);
218
                    $dev->setErrors($ar_buf[5] + $ar_buf[7]);
212
                    //$dev->setDrops($ar_buf[8]);
219
                    //$dev->setDrops($ar_buf[8]);
213
                    $this->sys->setNetDevices($dev);
220
                    $this->sys->setNetDevices($dev);
214
                }
221
                }
215
            }
222
            }
216
        }
223
        }
217
    }
224
    }
218
 
225
 
219
    /**
226
    /**
220
     * Physical memory information and Swap Space information
227
     * Physical memory information and Swap Space information
221
     * @return void
228
     * @return void
222
     */
229
     */
223
    private function _memory()
230
    private function _memory()
224
    {
231
    {
225
        $mems = "";
232
        $mems = "";
226
        $tswap = "";
233
        $tswap = "";
227
        $pswap = "";
234
        $pswap = "";
228
        foreach ($this->readaixdata() as $line) {
235
        foreach ($this->readaixdata() as $line) {
229
            if (preg_match("/^Good Memory Size:\s+(\d+)\s+MB/", $line, $ar_buf)) {
236
            if (preg_match("/^Good Memory Size:\s+(\d+)\s+MB/", $line, $ar_buf)) {
230
                $mems = $ar_buf[1];
237
                $mems = $ar_buf[1];
231
            }
238
            }
232
            if (preg_match("/^\s*Total Paging Space:\s+(\d+)MB/", $line, $ar_buf)) {
239
            if (preg_match("/^\s*Total Paging Space:\s+(\d+)MB/", $line, $ar_buf)) {
233
                $tswap = $ar_buf[1];
240
                $tswap = $ar_buf[1];
234
            }
241
            }
235
            if (preg_match("/^\s*Percent Used:\s+(\d+)%/", $line, $ar_buf)) {
242
            if (preg_match("/^\s*Percent Used:\s+(\d+)%/", $line, $ar_buf)) {
236
                $pswap = $ar_buf[1];
243
                $pswap = $ar_buf[1];
237
            }
244
            }
238
        }
245
        }
239
        if (trim($mems) != "") {
246
        if (trim($mems) != "") {
240
            $mems = $mems*1024*1024;
247
            $mems = $mems*1024*1024;
241
            $this->sys->setMemTotal($mems);
248
            $this->sys->setMemTotal($mems);
242
            $memu = 0;
249
            $memu = 0;
243
            $memf = 0;
250
            $memf = 0;
244
            if (CommonFunctions::executeProgram('svmon', '-G', $buf)) {
251
            if (CommonFunctions::executeProgram('svmon', '-G', $buf)) {
245
                if (preg_match("/^memory\s+\d+\s+(\d+)\s+/", $buf, $ar_buf)) {
252
                if (preg_match("/^memory\s+\d+\s+(\d+)\s+/", $buf, $ar_buf)) {
246
                    $memu = $ar_buf[1]*1024*4;
253
                    $memu = $ar_buf[1]*1024*4;
247
                    $memf = $mems - $memu;
254
                    $memf = $mems - $memu;
248
                }
255
                }
249
            }
256
            }
250
            $this->sys->setMemUsed($memu);
257
            $this->sys->setMemUsed($memu);
251
            $this->sys->setMemFree($memf);
258
            $this->sys->setMemFree($memf);
252
//            $this->sys->setMemApplication($mems);
259
//            $this->sys->setMemApplication($mems);
253
//            $this->sys->setMemBuffer($mems);
260
//            $this->sys->setMemBuffer($mems);
254
//            $this->sys->setMemCache($mems);
261
//            $this->sys->setMemCache($mems);
255
        }
262
        }
256
        if (trim($tswap) != "") {
263
        if (trim($tswap) != "") {
257
            $dev = new DiskDevice();
264
            $dev = new DiskDevice();
258
            $dev->setName("SWAP");
265
            $dev->setName("SWAP");
259
            $dev->setFsType('swap');
266
            $dev->setFsType('swap');
260
            $dev->setTotal($tswap * 1024 * 1024);
267
            $dev->setTotal($tswap * 1024 * 1024);
261
            if (trim($pswap) != "") {
268
            if (trim($pswap) != "") {
262
                $dev->setUsed($dev->getTotal() * $pswap / 100);
269
                $dev->setUsed($dev->getTotal() * $pswap / 100);
263
            }
270
            }
264
            $dev->setFree($dev->getTotal() - $dev->getUsed());
271
            $dev->setFree($dev->getTotal() - $dev->getUsed());
265
            $this->sys->setSwapDevices($dev);
272
            $this->sys->setSwapDevices($dev);
266
        }
273
        }
267
    }
274
    }
268
 
275
 
269
    /**
276
    /**
270
     * filesystem information
277
     * filesystem information
271
     *
278
     *
272
     * @return void
279
     * @return void
273
     */
280
     */
274
    private function _filesystems()
281
    private function _filesystems()
275
    {
282
    {
276
        if (CommonFunctions::executeProgram('df', '-kP', $df, PSI_DEBUG)) {
283
        if (CommonFunctions::executeProgram('df', '-kP', $df, PSI_DEBUG)) {
277
            $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
284
            $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
278
            if (CommonFunctions::executeProgram('mount', '-v', $s, PSI_DEBUG)) {
285
            if (CommonFunctions::executeProgram('mount', '-v', $s, PSI_DEBUG)) {
279
                $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
286
                $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
280
                foreach ($lines as $line) {
287
                foreach ($lines as $line) {
281
                    $a = preg_split('/ /', $line, -1, PREG_SPLIT_NO_EMPTY);
288
                    $a = preg_split('/ /', $line, -1, PREG_SPLIT_NO_EMPTY);
282
                    $fsdev[$a[0]] = $a[4];
289
                    $fsdev[$a[0]] = $a[4];
283
                }
290
                }
284
            }
291
            }
285
            foreach ($mounts as $mount) {
292
            foreach ($mounts as $mount) {
286
                $ar_buf = preg_split("/\s+/", $mount, 6);
293
                $ar_buf = preg_split("/\s+/", $mount, 6);
287
                $dev = new DiskDevice();
294
                $dev = new DiskDevice();
288
                $dev->setName($ar_buf[0]);
295
                $dev->setName($ar_buf[0]);
289
                $dev->setTotal($ar_buf[1] * 1024);
296
                $dev->setTotal($ar_buf[1] * 1024);
290
                $dev->setUsed($ar_buf[2] * 1024);
297
                $dev->setUsed($ar_buf[2] * 1024);
291
                $dev->setFree($ar_buf[3] * 1024);
298
                $dev->setFree($ar_buf[3] * 1024);
292
                $dev->setMountPoint($ar_buf[5]);
299
                $dev->setMountPoint($ar_buf[5]);
293
                if (isset($fsdev[$ar_buf[0]])) {
300
                if (isset($fsdev[$ar_buf[0]])) {
294
                    $dev->setFsType($fsdev[$ar_buf[0]]);
301
                    $dev->setFsType($fsdev[$ar_buf[0]]);
295
                }
302
                }
296
                $this->sys->setDiskDevices($dev);
303
                $this->sys->setDiskDevices($dev);
297
            }
304
            }
298
        }
305
        }
299
    }
306
    }
300
 
307
 
301
    /**
308
    /**
302
     * Distribution
309
     * Distribution
303
     *
310
     *
304
     * @return void
311
     * @return void
305
     */
312
     */
306
    private function _distro()
313
    private function _distro()
307
    {
314
    {
308
        $this->sys->setDistribution('IBM AIX');
315
        $this->sys->setDistribution('IBM AIX');
309
        $this->sys->setDistributionIcon('AIX.png');
316
        $this->sys->setDistributionIcon('AIX.png');
310
    }
317
    }
311
 
318
 
312
    /**
319
    /**
313
     * IBM AIX informations by K.PAZ
320
     * IBM AIX informations by K.PAZ
314
     * @return array
321
     * @return array
315
     */
322
     */
316
    private function readaixdata()
323
    private function readaixdata()
317
    {
324
    {
318
        if (count($this->_aixdata) === 0) {
325
        if (count($this->_aixdata) === 0) {
319
            if (CommonFunctions::executeProgram('prtconf', '', $bufr)) {
326
            if (CommonFunctions::executeProgram('prtconf', '', $bufr)) {
320
                $this->_aixdata = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
327
                $this->_aixdata = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
321
            }
328
            }
322
        }
329
        }
323
 
330
 
324
        return $this->_aixdata;
331
        return $this->_aixdata;
325
    }
332
    }
326
 
333
 
327
    /**
334
    /**
328
     * get the information
335
     * get the information
329
     *
336
     *
330
     * @see PSI_Interface_OS::build()
337
     * @see PSI_Interface_OS::build()
331
     *
338
     *
332
     * @return Void
339
     * @return void
333
     */
340
     */
334
    public function build()
341
    public function build()
335
    {
342
    {
336
        $this->error->addError("WARN", "The AIX version of phpSysInfo is a work in progress, some things currently don't work");
343
        $this->error->addWarning("The AIX version of phpSysInfo is a work in progress, some things currently don't work");
337
        if (!$this->blockname || $this->blockname==='vitals') {
344
        if (!$this->blockname || $this->blockname==='vitals') {
338
            $this->_distro();
345
            $this->_distro();
339
            $this->_hostname();
346
            $this->_hostname();
340
            $this->_kernel();
347
            $this->_kernel();
341
            $this->_uptime();
348
            $this->_uptime();
342
            $this->_users();
349
            $this->_users();
343
            $this->_loadavg();
350
            $this->_loadavg();
344
        }
351
        }
345
        if (!$this->blockname || $this->blockname==='hardware') {
352
        if (!$this->blockname || $this->blockname==='hardware') {
346
            $this->_cpuinfo();
353
            $this->_cpuinfo();
347
            $this->_pci();
354
            $this->_pci();
348
            $this->_ide();
355
            $this->_ide();
349
            $this->_scsi();
356
            $this->_scsi();
350
            $this->_usb();
357
            $this->_usb();
351
        }
358
        }
352
        if (!$this->blockname || $this->blockname==='network') {
-
 
353
            $this->_network();
-
 
354
        }
-
 
355
        if (!$this->blockname || $this->blockname==='memory') {
359
        if (!$this->blockname || $this->blockname==='memory') {
356
            $this->_memory();
360
            $this->_memory();
357
        }
361
        }
358
        if (!$this->blockname || $this->blockname==='filesystem') {
362
        if (!$this->blockname || $this->blockname==='filesystem') {
359
            $this->_filesystems();
363
            $this->_filesystems();
360
        }
364
        }
-
 
365
        if (!$this->blockname || $this->blockname==='network') {
-
 
366
            $this->_network();
-
 
367
        }
361
    }
368
    }
362
}
369
}
363
 
370