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
 * Minix System Class
3
 * Minix System Class
4
 *
4
 *
5
 * PHP version 5
5
 * PHP version 5
6
 *
6
 *
7
 * @category  PHP
7
 * @category  PHP
8
 * @package   PSI Minix OS class
8
 * @package   PSI Minix OS class
9
 * @author    Mieczyslaw Nalewaj <namiltd@users.sourceforge.net>
9
 * @author    Mieczyslaw Nalewaj <namiltd@users.sourceforge.net>
10
 * @copyright 2012 phpSysInfo
10
 * @copyright 2012 phpSysInfo
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.Minix.inc.php 687 2012-09-06 20:54:49Z namiltd $
12
 * @version   SVN: $Id: class.Minix.inc.php 687 2012-09-06 20:54:49Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
14
 */
15
 /**
15
 /**
16
 * Minix sysinfo class
16
 * Minix sysinfo class
17
 * get all the required information from Minix system
17
 * get all the required information from Minix system
18
 *
18
 *
19
 * @category  PHP
19
 * @category  PHP
20
 * @package   PSI Minix OS class
20
 * @package   PSI Minix OS class
21
 * @author    Mieczyslaw Nalewaj <namiltd@users.sourceforge.net>
21
 * @author    Mieczyslaw Nalewaj <namiltd@users.sourceforge.net>
22
 * @copyright 2012 phpSysInfo
22
 * @copyright 2012 phpSysInfo
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 Minix extends OS
27
class Minix extends OS
28
{
28
{
29
    /**
29
    /**
-
 
30
     * uptime command result.
-
 
31
     */
-
 
32
    private $_uptime = null;
-
 
33
 
-
 
34
    /**
30
     * content of the syslog
35
     * content of the syslog
31
     *
36
     *
32
     * @var array
37
     * @var array
33
     */
38
     */
34
    private $_dmesg = null;
39
    private $_dmesg = null;
35
 
40
 
36
    /**
41
    /**
37
     * read /var/log/messages, but only if we haven't already
42
     * read /var/log/messages, but only if we haven't already
38
     *
43
     *
39
     * @return array
44
     * @return array
40
     */
45
     */
41
    protected function readdmesg()
46
    protected function readdmesg()
42
    {
47
    {
43
        if ($this->_dmesg === null) {
48
        if ($this->_dmesg === null) {
44
            if (CommonFunctions::rfts('/var/log/messages', $buf)) {
49
            if (CommonFunctions::rfts('/var/log/messages', $buf)) {
45
                    $blocks = preg_replace("/\s(kernel: MINIX \d+\.\d+\.\d+\.)/", '<BLOCK>$1', $buf);
50
                    $blocks = preg_replace("/\s(kernel: MINIX \d+\.\d+\.\d+\.)/", '<BLOCK>$1', $buf);
46
                    $parts = preg_split("/<BLOCK>/", $blocks, -1, PREG_SPLIT_NO_EMPTY);
51
                    $parts = preg_split("/<BLOCK>/", $blocks, -1, PREG_SPLIT_NO_EMPTY);
47
                    $this->_dmesg = preg_split("/\n/", $parts[count($parts) - 1], -1, PREG_SPLIT_NO_EMPTY);
52
                    $this->_dmesg = preg_split("/\n/", $parts[count($parts) - 1], -1, PREG_SPLIT_NO_EMPTY);
48
            } else {
53
            } else {
49
                $this->_dmesg = array();
54
                $this->_dmesg = array();
50
            }
55
            }
51
        }
56
        }
52
 
57
 
53
        return $this->_dmesg;
58
        return $this->_dmesg;
54
    }
59
    }
55
 
60
 
56
    /**
61
    /**
57
     * get the cpu information
62
     * get the cpu information
58
     *
63
     *
59
     * @return void
64
     * @return void
60
     */
65
     */
61
    protected function _cpuinfo()
66
    protected function _cpuinfo()
62
    {
67
    {
63
        if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
68
        if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
64
            $processors = preg_split('/\s?\n\s?\n/', trim($bufr));
69
            $processors = preg_split('/\s?\n\s?\n/', trim($bufr));
65
            foreach ($processors as $processor) {
70
            foreach ($processors as $processor) {
66
                $_n = ""; $_f = ""; $_m = ""; $_s = "";
71
                $_n = ""; $_f = ""; $_m = ""; $_s = "";
67
                $dev = new CpuDevice();
72
                $dev = new CpuDevice();
68
                $details = preg_split("/\n/", $processor, -1, PREG_SPLIT_NO_EMPTY);
73
                $details = preg_split("/\n/", $processor, -1, PREG_SPLIT_NO_EMPTY);
69
                foreach ($details as $detail) {
74
                foreach ($details as $detail) {
70
                    $arrBuff = preg_split('/\s+:\s+/', trim($detail));
75
                    $arrBuff = preg_split('/\s+:\s+/', trim($detail));
71
                    if (count($arrBuff) == 2) {
76
                    if (count($arrBuff) == 2) {
72
                        switch (strtolower($arrBuff[0])) {
77
                        switch (strtolower($arrBuff[0])) {
73
                        case 'model name':
78
                        case 'model name':
74
                            $_n = $arrBuff[1];
79
                            $_n = $arrBuff[1];
75
                            break;
80
                            break;
76
                        case 'cpu mhz':
81
                        case 'cpu mhz':
77
                            $dev->setCpuSpeed($arrBuff[1]);
82
                            $dev->setCpuSpeed($arrBuff[1]);
78
                            break;
83
                            break;
79
                        case 'cpu family':
84
                        case 'cpu family':
80
                            $_f = $arrBuff[1];
85
                            $_f = $arrBuff[1];
81
                            break;
86
                            break;
82
                        case 'model':
87
                        case 'model':
83
                            $_m = $arrBuff[1];
88
                            $_m = $arrBuff[1];
84
                            break;
89
                            break;
85
                        case 'stepping':
90
                        case 'stepping':
86
                            $_s = $arrBuff[1];
91
                            $_s = $arrBuff[1];
87
                            break;
92
                            break;
88
                        case 'flags':
93
                        case 'flags':
89
                            if (preg_match("/ vmx/", $arrBuff[1])) {
94
                            if (preg_match("/ vmx/", $arrBuff[1])) {
90
                                $dev->setVirt("vmx");
95
                                $dev->setVirt("vmx");
91
                            } elseif (preg_match("/ svm/", $arrBuff[1])) {
96
                            } elseif (preg_match("/ svm/", $arrBuff[1])) {
92
                                $dev->setVirt("svm");
97
                                $dev->setVirt("svm");
93
                            }
98
                            }
94
                            break;
99
                            break;
95
                        case 'vendor_id':
100
                        case 'vendor_id':
96
                            $dev->setVendorId($arrBuff[1]);
101
                            $dev->setVendorId($arrBuff[1]);
97
                            break;
-
 
98
                        }
102
                        }
99
                    }
103
                    }
100
                }
104
                }
101
                if ($_n == "") $_n="CPU";
105
                if ($_n == "") $_n="CPU";
102
                if ($_f != "") $_n.=" Family ".$_f;
106
                if ($_f != "") $_n.=" Family ".$_f;
103
                if ($_m != "") $_n.=" Model ".$_m;
107
                if ($_m != "") $_n.=" Model ".$_m;
104
                if ($_s != "") $_n.=" Stepping ".$_s;
108
                if ($_s != "") $_n.=" Stepping ".$_s;
105
                $dev->SetModel($_n);
109
                $dev->SetModel($_n);
106
                $this->sys->setCpus($dev);
110
                $this->sys->setCpus($dev);
107
            }
111
            }
108
        } else
112
        } else
109
        foreach ($this->readdmesg() as $line) {
113
        foreach ($this->readdmesg() as $line) {
110
            if (preg_match('/kernel: (CPU .*) freq (.*) MHz/', $line, $ar_buf)) {
114
            if (preg_match('/kernel: (CPU .*) freq (.*) MHz/', $line, $ar_buf)) {
111
                $dev = new CpuDevice();
115
                $dev = new CpuDevice();
112
                $dev->setModel($ar_buf[1]);
116
                $dev->setModel($ar_buf[1]);
113
                $dev->setCpuSpeed($ar_buf[2]);
117
                $dev->setCpuSpeed($ar_buf[2]);
114
                $this->sys->setCpus($dev);
118
                $this->sys->setCpus($dev);
115
            }
119
            }
116
        }
120
        }
117
    }
121
    }
118
 
122
 
119
    /**
123
    /**
120
     * PCI devices
124
     * PCI devices
121
     * get the pci device information out of dmesg
125
     * get the pci device information out of dmesg
122
     *
126
     *
123
     * @return void
127
     * @return void
124
     */
128
     */
125
    protected function _pci()
129
    protected function _pci()
126
    {
130
    {
127
        if (CommonFunctions::rfts('/proc/pci', $strBuf, 0, 4096, false)) {
131
        if (CommonFunctions::rfts('/proc/pci', $strBuf, 0, 4096, false)) {
128
            $arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
132
            $arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
129
            $arrResults = array();
133
            $arrResults = array();
130
            foreach ($arrLines as $strLine) {
134
            foreach ($arrLines as $strLine) {
131
               $arrParams = preg_split('/\s+/', trim($strLine), 4);
135
               $arrParams = preg_split('/\s+/', trim($strLine), 4);
132
               if (count($arrParams) == 4)
136
               if (count($arrParams) == 4)
133
                  $strName = $arrParams[3];
137
                  $strName = $arrParams[3];
134
               else
138
               else
135
                  $strName = "unknown";
139
                  $strName = "unknown";
136
               $strName = preg_replace('/\(.*\)/', '', $strName);
140
               $strName = preg_replace('/\(.*\)/', '', $strName);
137
               $dev = new HWDevice();
141
               $dev = new HWDevice();
138
               $dev->setName($strName);
142
               $dev->setName($strName);
139
               $arrResults[] = $dev;
143
               $arrResults[] = $dev;
140
            }
144
            }
141
            foreach ($arrResults as $dev) {
145
            foreach ($arrResults as $dev) {
142
                $this->sys->setPciDevices($dev);
146
                $this->sys->setPciDevices($dev);
143
            }
147
            }
144
        }
148
        }
145
        if (!(isset($arrResults) && is_array($arrResults)) && ($results = Parser::lspci())) {
149
        if (!(isset($arrResults) && is_array($arrResults)) && ($results = Parser::lspci())) {
146
            /* if access error: chmod 4755 /usr/bin/lspci */
150
            /* if access error: chmod 4755 /usr/bin/lspci */
147
            foreach ($results as $dev) {
151
            foreach ($results as $dev) {
148
                $this->sys->setPciDevices($dev);
152
                $this->sys->setPciDevices($dev);
149
            }
153
            }
150
        }
154
        }
151
    }
155
    }
152
 
156
 
153
    /**
157
    /**
154
     * Minix Version
158
     * Minix Version
155
     *
159
     *
156
     * @return void
160
     * @return void
157
     */
161
     */
158
    private function _kernel()
162
    private function _kernel()
159
    {
163
    {
160
        if (CommonFunctions::executeProgram('uname', '-rvm', $ret)) {
164
        if (CommonFunctions::executeProgram('uname', '-rvm', $ret)) {
161
            foreach ($this->readdmesg() as $line) {
165
            foreach ($this->readdmesg() as $line) {
162
                if (preg_match('/kernel: MINIX (\d+\.\d+\.\d+)\. \((.+)\)/', $line, $ar_buf)) {
166
                if (preg_match('/kernel: MINIX (\d+\.\d+\.\d+)\. \((.+)\)/', $line, $ar_buf)) {
163
                    $branch = $ar_buf[2];
167
                    $branch = $ar_buf[2];
164
                    break;
168
                    break;
165
                }
169
                }
166
            }
170
            }
167
            if (isset($branch))
171
            if (isset($branch))
168
               $this->sys->setKernel($ret.' ('.$branch.')');
172
               $this->sys->setKernel($ret.' ('.$branch.')');
169
            else
173
            else
170
               $this->sys->setKernel($ret);
174
               $this->sys->setKernel($ret);
171
        }
175
        }
172
    }
176
    }
173
 
177
 
174
    /**
178
    /**
175
     * Distribution
179
     * Distribution
176
     *
180
     *
177
     * @return void
181
     * @return void
178
     */
182
     */
179
    protected function _distro()
183
    protected function _distro()
180
    {
184
    {
181
        if (CommonFunctions::executeProgram('uname', '-sr', $ret))
185
        if (CommonFunctions::executeProgram('uname', '-sr', $ret))
182
            $this->sys->setDistribution($ret);
186
            $this->sys->setDistribution($ret);
183
        else
187
        else
184
            $this->sys->setDistribution('Minix');
188
            $this->sys->setDistribution('Minix');
185
 
189
 
186
        $this->sys->setDistributionIcon('Minix.png');
190
        $this->sys->setDistributionIcon('Minix.png');
187
    }
191
    }
188
 
192
 
189
    /**
193
    /**
190
     * UpTime
194
     * UpTime
191
     * time the system is running
195
     * time the system is running
192
     *
196
     *
193
     * @return void
197
     * @return void
194
     */
198
     */
195
    private function _uptime()
199
    private function _uptime()
196
    {
200
    {
197
        if (CommonFunctions::executeProgram('uptime', '', $buf)) {
201
        if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
198
            if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
202
            if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $this->_uptime, $ar_buf)) {
199
                $min = $ar_buf[3];
203
                $min = $ar_buf[3];
200
                $hours = $ar_buf[2];
204
                $hours = $ar_buf[2];
201
                $days = $ar_buf[1];
205
                $days = $ar_buf[1];
202
                $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);
206
                $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);
203
            } elseif (preg_match("/up (\d+):(\d+),/", $buf, $ar_buf)) {
207
            } elseif (preg_match("/up (\d+):(\d+),/", $this->_uptime, $ar_buf)) {
204
                $min = $ar_buf[2];
208
                $min = $ar_buf[2];
205
                $hours = $ar_buf[1];
209
                $hours = $ar_buf[1];
206
                $this->sys->setUptime($hours * 3600 + $min * 60);
210
                $this->sys->setUptime($hours * 3600 + $min * 60);
207
            }
211
            }
208
        }
212
        }
209
    }
213
    }
210
 
214
 
211
    /**
215
    /**
212
     * Processor Load
216
     * Processor Load
213
     * optionally create a loadbar
217
     * optionally create a loadbar
214
     *
218
     *
215
     * @return void
219
     * @return void
216
     */
220
     */
217
    private function _loadavg()
221
    private function _loadavg()
218
    {
222
    {
219
        if (CommonFunctions::executeProgram('uptime', '', $buf)) {
223
        if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
220
            if (preg_match("/load averages: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
224
            if (preg_match("/load averages: (.*), (.*), (.*)$/", $this->_uptime, $ar_buf)) {
221
                $this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
225
                $this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
222
            }
226
            }
223
        }
227
        }
224
    }
228
    }
225
 
229
 
226
    /**
230
    /**
227
     * Virtual Host Name
231
     * Virtual Host Name
228
     *
232
     *
229
     * @return void
233
     * @return void
230
     */
234
     */
231
    private function _hostname()
235
    private function _hostname()
232
    {
236
    {
233
        if (PSI_USE_VHOST === true) {
237
        if (PSI_USE_VHOST) {
234
            if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
238
            if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
235
        } else {
239
        } else {
236
            if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {
240
            if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {
237
                $ip = gethostbyname($result);
241
                $ip = gethostbyname($result);
238
                if ($ip != $result) {
242
                if ($ip != $result) {
239
                    $this->sys->setHostname(gethostbyaddr($ip));
243
                    $this->sys->setHostname(gethostbyaddr($ip));
240
                }
244
                }
241
            }
245
            }
242
        }
246
        }
243
    }
247
    }
244
 
248
 
245
 
249
 
246
    /**
250
    /**
247
     *  Physical memory information and Swap Space information
251
     *  Physical memory information and Swap Space information
248
     *
252
     *
249
     *  @return void
253
     *  @return void
250
     */
254
     */
251
    private function _memory()
255
    private function _memory()
252
    {
256
    {
253
        if (CommonFunctions::rfts('/proc/meminfo', $bufr, 1, 4096, false)) {
257
        if (CommonFunctions::rfts('/proc/meminfo', $bufr, 1, 4096, false)) {
254
            $ar_buf = preg_split('/\s+/', trim($bufr));
258
            $ar_buf = preg_split('/\s+/', trim($bufr));
255
            if (count($ar_buf) >= 5) {
259
            if (count($ar_buf) >= 5) {
256
                    $this->sys->setMemTotal($ar_buf[0]*$ar_buf[1]);
260
                    $this->sys->setMemTotal($ar_buf[0]*$ar_buf[1]);
257
                    $this->sys->setMemFree($ar_buf[0]*$ar_buf[2]);
261
                    $this->sys->setMemFree($ar_buf[0]*$ar_buf[2]);
258
                    $this->sys->setMemCache($ar_buf[0]*$ar_buf[4]);
262
                    $this->sys->setMemCache($ar_buf[0]*$ar_buf[4]);
259
                    $this->sys->setMemUsed($ar_buf[0]*($ar_buf[1]-$ar_buf[2]));
263
                    $this->sys->setMemUsed($ar_buf[0]*($ar_buf[1]-$ar_buf[2]));
260
            }
264
            }
261
        }
265
        }
262
    }
266
    }
263
 
267
 
264
    /**
268
    /**
265
     * filesystem information
269
     * filesystem information
266
     *
270
     *
267
     * @return void
271
     * @return void
268
     */
272
     */
269
    private function _filesystems()
273
    private function _filesystems()
270
    {
274
    {
271
        $arrResult = Parser::df("-P 2>/dev/null");
275
        $arrResult = Parser::df("-P 2>/dev/null");
272
        foreach ($arrResult as $dev) {
276
        foreach ($arrResult as $dev) {
273
            $this->sys->setDiskDevices($dev);
277
            $this->sys->setDiskDevices($dev);
274
        }
278
        }
275
    }
279
    }
276
 
280
 
277
    /**
281
    /**
278
     * network information
282
     * network information
279
     *
283
     *
280
     * @return void
284
     * @return void
281
     */
285
     */
282
    private function _network()
286
    private function _network()
283
    {
287
    {
284
        if (CommonFunctions::executeProgram('ifconfig', '-a', $bufr, PSI_DEBUG)) {
288
        if (CommonFunctions::executeProgram('ifconfig', '-a', $bufr, PSI_DEBUG)) {
285
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
289
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
286
            foreach ($lines as $line) {
290
            foreach ($lines as $line) {
287
                if (preg_match("/^([^\s:]+):\saddress\s(\S+)\snetmask/", $line, $ar_buf)) {
291
                if (preg_match("/^([^\s:]+):\saddress\s(\S+)\snetmask/", $line, $ar_buf)) {
288
                    $dev = new NetDevice();
292
                    $dev = new NetDevice();
289
                    $dev->setName($ar_buf[1]);
293
                    $dev->setName($ar_buf[1]);
290
                    if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS)) {
294
                    if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS)) {
291
                            $dev->setInfo($ar_buf[2]);
295
                            $dev->setInfo($ar_buf[2]);
292
                    }
296
                    }
293
                    $this->sys->setNetDevices($dev);
297
                    $this->sys->setNetDevices($dev);
294
                }
298
                }
295
            }
299
            }
296
        }
300
        }
297
    }
301
    }
298
 
302
 
299
    /**
303
    /**
300
     * Processes
304
     * Processes
301
     *
305
     *
302
     * @return void
306
     * @return void
303
     */
307
     */
304
    protected function _processes()
308
    protected function _processes()
305
    {
309
    {
306
        if (CommonFunctions::executeProgram('ps', 'alx', $bufr, PSI_DEBUG)) {
310
        if (CommonFunctions::executeProgram('ps', 'alx', $bufr, PSI_DEBUG)) {
307
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
311
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
308
            $processes['*'] = 0;
312
            $processes['*'] = 0;
309
            foreach ($lines as $line) {
313
            foreach ($lines as $line) {
310
                if (preg_match("/^\s(\w)\s/", $line, $ar_buf)) {
314
                if (preg_match("/^\s(\w)\s/", $line, $ar_buf)) {
311
                    $processes['*']++;
315
                    $processes['*']++;
312
                    $state = $ar_buf[1];
316
                    $state = $ar_buf[1];
313
                    if ($state == 'W') $state = 'D'; //linux format
317
                    if ($state == 'W') $state = 'D'; //linux format
314
                    elseif ($state == 'D') $state = 'd'; //invalid
318
                    elseif ($state == 'D') $state = 'd'; //invalid
315
                    if (isset($processes[$state])) {
319
                    if (isset($processes[$state])) {
316
                        $processes[$state]++;
320
                        $processes[$state]++;
317
                    } else {
321
                    } else {
318
                        $processes[$state] = 1;
322
                        $processes[$state] = 1;
319
                    }
323
                    }
320
                }
324
                }
321
            }
325
            }
322
            if ($processes['*'] > 0) {
326
            if ($processes['*'] > 0) {
323
                $this->sys->setProcesses($processes);
327
                $this->sys->setProcesses($processes);
324
            }
328
            }
325
        }
329
        }
326
    }
330
    }
327
 
331
 
328
    /**
332
    /**
329
     * get the information
333
     * get the information
330
     *
334
     *
331
     * @return Void
335
     * @return void
332
     */
336
     */
333
    public function build()
337
    public function build()
334
    {
338
    {
335
        $this->error->addError("WARN", "The Minix version of phpSysInfo is a work in progress, some things currently don't work");
339
        $this->error->addWarning("The Minix version of phpSysInfo is a work in progress, some things currently don't work");
336
        if (!$this->blockname || $this->blockname==='vitals') {
340
        if (!$this->blockname || $this->blockname==='vitals') {
337
            $this->_distro();
341
            $this->_distro();
338
            $this->_hostname();
342
            $this->_hostname();
339
            $this->_kernel();
343
            $this->_kernel();
340
            $this->_uptime();
344
            $this->_uptime();
341
            $this->_users();
345
            $this->_users();
342
            $this->_loadavg();
346
            $this->_loadavg();
343
            $this->_processes();
347
            $this->_processes();
344
        }
348
        }
345
        if (!$this->blockname || $this->blockname==='hardware') {
349
        if (!$this->blockname || $this->blockname==='hardware') {
346
            $this->_pci();
350
            $this->_pci();
347
            $this->_cpuinfo();
351
            $this->_cpuinfo();
348
        }
352
        }
349
        if (!$this->blockname || $this->blockname==='network') {
-
 
350
            $this->_network();
-
 
351
        }
-
 
352
        if (!$this->blockname || $this->blockname==='memory') {
353
        if (!$this->blockname || $this->blockname==='memory') {
353
            $this->_memory();
354
            $this->_memory();
354
        }
355
        }
355
        if (!$this->blockname || $this->blockname==='filesystem') {
356
        if (!$this->blockname || $this->blockname==='filesystem') {
356
            $this->_filesystems();
357
            $this->_filesystems();
357
        }
358
        }
-
 
359
        if (!$this->blockname || $this->blockname==='network') {
-
 
360
            $this->_network();
-
 
361
        }
358
    }
362
    }
359
}
363
}
360
 
364