Subversion Repositories ALCASAR

Rev

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

Rev 3037 Rev 3100
1
<?php
1
<?php
2
/**
2
/**
3
 * Basic OS Class
3
 * Basic OS Class
4
 *
4
 *
5
 * PHP version 5
5
 * PHP version 5
6
 *
6
 *
7
 * @category  PHP
7
 * @category  PHP
8
 * @package   PSI OS class
8
 * @package   PSI OS class
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
10
 * @copyright 2009 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.OS.inc.php 699 2012-09-15 11:57:13Z namiltd $
12
 * @version   SVN: $Id: class.OS.inc.php 699 2012-09-15 11:57:13Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
14
 */
15
 /**
15
 /**
16
 * Basic OS functions for all OS classes
16
 * Basic OS functions for all OS classes
17
 *
17
 *
18
 * @category  PHP
18
 * @category  PHP
19
 * @package   PSI OS class
19
 * @package   PSI OS class
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
21
 * @copyright 2009 phpSysInfo
21
 * @copyright 2009 phpSysInfo
22
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
22
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
23
 * @version   Release: 3.0
23
 * @version   Release: 3.0
24
 * @link      http://phpsysinfo.sourceforge.net
24
 * @link      http://phpsysinfo.sourceforge.net
25
 */
25
 */
26
abstract class OS implements PSI_Interface_OS
26
abstract class OS implements PSI_Interface_OS
27
{
27
{
28
    /**
28
    /**
29
     * object for error handling
29
     * object for error handling
30
     *
30
     *
31
     * @var PSI_Error
31
     * @var PSI_Error
32
     */
32
     */
33
    protected $error;
33
    protected $error;
34
 
34
 
35
    /**
35
    /**
36
     * block name
36
     * block name
37
     *
37
     *
38
     * @var string
38
     * @var string
39
     */
39
     */
40
    protected $blockname = false;
40
    protected $blockname = false;
41
 
41
 
42
    /**
42
    /**
43
     * @var System
43
     * @var System
44
     */
44
     */
45
    protected $sys;
45
    protected $sys;
46
 
46
 
47
    /**
47
    /**
48
     * build the global Error object
48
     * build the global Error object
49
     */
49
     */
50
    public function __construct($blockname = false)
50
    public function __construct($blockname = false)
51
    {
51
    {
52
        $this->error = PSI_Error::singleton();
52
        $this->error = PSI_Error::singleton();
53
        $this->sys = new System();
53
        $this->sys = new System();
54
        $this->blockname = $blockname;
54
        $this->blockname = $blockname;
-
 
55
        $this->sys->setOS(get_class($this));
55
    }
56
    }
56
 
57
 
57
    /**
58
    /**
58
     * get os specific encoding
59
     * get os specific encoding
59
     *
60
     *
60
     * @see PSI_Interface_OS::getEncoding()
61
     * @see PSI_Interface_OS::getEncoding()
61
     *
62
     *
62
     * @return string
63
     * @return string
63
     */
64
     */
64
    public function getEncoding()
65
    public function getEncoding()
65
    {
66
    {
66
        return PSI_SYSTEM_CODEPAGE;
67
        return PSI_SYSTEM_CODEPAGE;
67
    }
68
    }
68
 
69
 
69
    /**
70
    /**
70
     * get os specific language
71
     * get os specific language
71
     *
72
     *
72
     * @see PSI_Interface_OS::getLanguage()
73
     * @see PSI_Interface_OS::getLanguage()
73
     *
74
     *
74
     * @return string
75
     * @return string
75
     */
76
     */
76
    public function getLanguage()
77
    public function getLanguage()
77
    {
78
    {
78
        return PSI_SYSTEM_LANG;
79
        return PSI_SYSTEM_LANG;
79
    }
80
    }
80
 
81
 
81
    /**
82
    /**
82
     * get block name
83
     * get block name
83
     *
84
     *
84
     * @see PSI_Interface_OS::getBlockName()
85
     * @see PSI_Interface_OS::getBlockName()
85
     *
86
     *
86
     * @return string
87
     * @return string
87
     */
88
     */
88
    public function getBlockName()
89
    public function getBlockName()
89
    {
90
    {
90
        return $this->blockname;
91
        return $this->blockname;
91
    }
92
    }
92
 
93
 
93
    /**
94
    /**
94
     * Number of Users
95
     * Number of Users
95
     *
96
     *
96
     * @return void
97
     * @return void
97
     */
98
     */
98
    protected function _users()
99
    protected function _users()
99
    {
100
    {
100
        if (CommonFunctions::executeProgram('who', '', $strBuf, PSI_DEBUG)) {
101
        if (CommonFunctions::executeProgram('who', '', $strBuf, PSI_DEBUG)) {
101
            if (strlen($strBuf) > 0) {
102
            if (strlen($strBuf) > 0) {
102
                $lines = preg_split('/\n/', $strBuf);
103
                $lines = preg_split('/\n/', $strBuf);
103
                $this->sys->setUsers(count($lines));
104
                $this->sys->setUsers(count($lines));
104
            }
105
            }
105
        } elseif (CommonFunctions::executeProgram('uptime', '', $buf, PSI_DEBUG) && preg_match("/,\s+(\d+)\s+user[s]?,/", $buf, $ar_buf)) {
106
        } elseif (CommonFunctions::executeProgram('uptime', '', $buf, PSI_DEBUG) && preg_match("/,\s+(\d+)\s+user[s]?,/", $buf, $ar_buf)) {
106
        //} elseif (CommonFunctions::executeProgram('uptime', '', $buf) && preg_match("/,\s+(\d+)\s+user[s]?,\s+load average[s]?:\s+(.*),\s+(.*),\s+(.*)$/", $buf, $ar_buf)) {
107
        //} elseif (CommonFunctions::executeProgram('uptime', '', $buf) && preg_match("/,\s+(\d+)\s+user[s]?,\s+load average[s]?:\s+(.*),\s+(.*),\s+(.*)$/", $buf, $ar_buf)) {
107
            $this->sys->setUsers($ar_buf[1]);
108
            $this->sys->setUsers($ar_buf[1]);
108
        } else {
109
        } else {
109
            $processlist = CommonFunctions::findglob('/proc/*/cmdline', GLOB_NOSORT);
110
            $processlist = CommonFunctions::findglob('/proc/*/cmdline', GLOB_NOSORT);
110
            if (is_array($processlist) && (($total = count($processlist)) > 0)) {
111
            if (is_array($processlist) && (($total = count($processlist)) > 0)) {
111
                $count = 0;
112
                $count = 0;
112
                $buf = "";
113
                $buf = "";
113
                for ($i = 0; $i < $total; $i++) {
114
                for ($i = 0; $i < $total; $i++) {
114
                    if (CommonFunctions::rfts($processlist[$i], $buf, 0, 4096, false)) {
115
                    if (CommonFunctions::rfts($processlist[$i], $buf, 0, 4096, false)) {
115
                        $name = str_replace(chr(0), ' ', trim($buf));
116
                        $name = str_replace(chr(0), ' ', trim($buf));
116
                        if (preg_match("/^-/", $name)) {
117
                        if (preg_match("/^-/", $name)) {
117
                            $count++;
118
                            $count++;
118
                        }
119
                        }
119
                    }
120
                    }
120
                }
121
                }
121
                if ($count > 0) {
122
                if ($count > 0) {
122
                    $this->sys->setUsers($count);
123
                    $this->sys->setUsers($count);
123
                }
124
                }
124
            }
125
            }
125
        }
126
        }
126
    }
127
    }
127
 
128
 
128
    /**
129
    /**
129
     * IP of the Host
130
     * IP of the Host
130
     *
131
     *
131
     * @return void
132
     * @return void
132
     */
133
     */
133
    protected function _ip()
134
    protected function _ip()
134
    {
135
    {
135
        if (PSI_USE_VHOST && !defined('PSI_EMU_HOSTNAME')) {
136
        if (PSI_USE_VHOST && !defined('PSI_EMU_HOSTNAME')) {
136
           if ((CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result)) //is server address defined
137
           if ((CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result)) //is server address defined
137
              && !strstr($result, '.') && strstr($result, ':')) { //is IPv6, quick version of preg_match('/\(([[0-9A-Fa-f\:]+)\)/', $result)
138
              && !strstr($result, '.') && strstr($result, ':')) { //is IPv6, quick version of preg_match('/\(([[0-9A-Fa-f\:]+)\)/', $result)
138
                $dnsrec = dns_get_record($this->sys->getHostname(), DNS_AAAA);
139
                $dnsrec = dns_get_record($this->sys->getHostname(), DNS_AAAA);
139
                if (isset($dnsrec[0]['ipv6'])) { //is DNS IPv6 record
140
                if (isset($dnsrec[0]['ipv6'])) { //is DNS IPv6 record
140
                    $this->sys->setIp($dnsrec[0]['ipv6']); //from DNS (avoid IPv6 NAT translation)
141
                    $this->sys->setIp($dnsrec[0]['ipv6']); //from DNS (avoid IPv6 NAT translation)
141
                } else {
142
                } else {
142
                    $this->sys->setIp(preg_replace('/^::ffff:/i', '', $result)); //from SERVER_ADDR or LOCAL_ADDR
143
                    $this->sys->setIp(preg_replace('/^::ffff:/i', '', $result)); //from SERVER_ADDR or LOCAL_ADDR
143
                }
144
                }
144
            } else {
145
            } else {
145
                $this->sys->setIp(gethostbyname($this->sys->getHostname())); //IPv4 only
146
                $this->sys->setIp(gethostbyname($this->sys->getHostname())); //IPv4 only
146
            }
147
            }
147
        } elseif (((PSI_OS != 'WINNT') && !defined('PSI_EMU_HOSTNAME')) && (CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result))) {
148
        } elseif (((PSI_OS != 'WINNT') && !defined('PSI_EMU_HOSTNAME')) && (CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result))) {
148
            $this->sys->setIp(preg_replace('/^::ffff:/i', '', $result));
149
            $this->sys->setIp(preg_replace('/^::ffff:/i', '', $result));
149
        } else {
150
        } else {
150
            //$this->sys->setIp(gethostbyname($this->sys->getHostname()));
151
            //$this->sys->setIp(gethostbyname($this->sys->getHostname()));
151
            $hn = $this->sys->getHostname();
152
            $hn = $this->sys->getHostname();
152
            $ghbn = gethostbyname($hn);
153
            $ghbn = gethostbyname($hn);
153
            if (defined('PSI_EMU_HOSTNAME') && ($hn === $ghbn)) {
154
            if (defined('PSI_EMU_HOSTNAME') && ($hn === $ghbn)) {
154
                $this->sys->setIp(PSI_EMU_HOSTNAME);
155
                $this->sys->setIp(PSI_EMU_HOSTNAME);
155
            } else {
156
            } else {
156
                $this->sys->setIp($ghbn);
157
                $this->sys->setIp($ghbn);
157
            }
158
            }
158
        }
159
        }
159
    }
160
    }
160
 
161
 
161
    /**
162
    /**
162
     * MEM information from dmidecode
163
     * MEM information from dmidecode
163
     *
164
     *
164
     * @return void
165
     * @return void
165
     */
166
     */
166
    protected function _dmimeminfo()
167
    protected function _dmimeminfo()
167
    {
168
    {
168
        $dmimd = CommonFunctions::readdmimemdata();
169
        $dmimd = CommonFunctions::readdmimemdata();
169
        if (!empty($dmimd)) {
170
        if (!empty($dmimd)) {
170
            foreach ($dmimd as $mem) {
171
            foreach ($dmimd as $mem) {
171
                if (isset($mem['Size']) && preg_match('/^(\d+)\s(M|G)B$/', $mem['Size'], $size) && ($size[1] > 0)) {
172
                if (isset($mem['Size']) && preg_match('/^(\d+)\s(M|G)B$/', $mem['Size'], $size) && ($size[1] > 0)) {
172
                    $dev = new HWDevice();
173
                    $dev = new HWDevice();
173
                    $name = '';
174
                    $name = '';
174
                    if (isset($mem['Part Number']) && !preg_match("/^PartNum\d+$/", $part = $mem['Part Number']) && ($part != 'None') && ($part != 'N/A') && ($part != 'Not Specified') && ($part != 'NOT AVAILABLE')) {
175
                    if (isset($mem['Part Number']) && !preg_match("/^PartNum\d+$/", $part = $mem['Part Number']) && ($part != 'None') && ($part != 'N/A') && ($part != 'Not Specified') && ($part != 'NOT AVAILABLE')) {
175
                        $name = $part;
176
                        $name = $part;
176
                    }
177
                    }
177
                    if (isset($mem['Locator']) && (($dloc = $mem['Locator']) != 'None') && ($dloc != 'N/A') && ($dloc != 'Not Specified')) {
178
                    if (isset($mem['Locator']) && (($dloc = $mem['Locator']) != 'None') && ($dloc != 'N/A') && ($dloc != 'Not Specified')) {
178
                        if ($name != '') {
179
                        if ($name != '') {
179
                            $name .= ' - '.$dloc;
180
                            $name .= ' - '.$dloc;
180
                        } else {
181
                        } else {
181
                            $name = $dloc;
182
                            $name = $dloc;
182
                        }
183
                        }
183
                    }
184
                    }
184
                    if (isset($mem['Bank Locator']) && (($bank = $mem['Bank Locator']) != 'None') && ($bank != 'N/A') && ($bank != 'Not Specified')) {
185
                    if (isset($mem['Bank Locator']) && (($bank = $mem['Bank Locator']) != 'None') && ($bank != 'N/A') && ($bank != 'Not Specified')) {
185
                        if ($name != '') {
186
                        if ($name != '') {
186
                            $name .= ' in '.$bank;
187
                            $name .= ' in '.$bank;
187
                        } else {
188
                        } else {
188
                            $name = 'Physical Memory in '.$bank;
189
                            $name = 'Physical Memory in '.$bank;
189
                        }
190
                        }
190
                    }
191
                    }
191
                    if ($name != '') {
192
                    if ($name != '') {
192
                        $dev->setName(trim($name));
193
                        $dev->setName(trim($name));
193
                    } else {
194
                    } else {
194
                        $dev->setName('Physical Memory');
195
                        $dev->setName('Physical Memory');
195
                    }
196
                    }
196
                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
197
                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
197
                        if (isset($mem['Manufacturer']) && !preg_match("/^([A-F\d]{4}|[A-F\d]{12}|[A-F\d]{16})$/", $manufacturer = $mem['Manufacturer']) && !preg_match("/^Manufacturer\d+$/", $manufacturer) && !preg_match("/^Mfg \d+$/", $manufacturer) && !preg_match("/^JEDEC ID:/", $manufacturer) && ($manufacturer != 'None') && ($manufacturer != 'N/A') && ($manufacturer != 'Not Specified') && ($manufacturer != 'UNKNOWN')) {
198
                        if (isset($mem['Manufacturer']) && !preg_match("/^([A-F\d]{4}|[A-F\d]{12}|[A-F\d]{16})$/", $manufacturer = $mem['Manufacturer']) && !preg_match("/^Manufacturer\d+$/", $manufacturer) && !preg_match("/^Mfg \d+$/", $manufacturer) && !preg_match("/^JEDEC ID:/", $manufacturer) && ($manufacturer != 'None') && ($manufacturer != 'N/A') && ($manufacturer != 'Not Specified') && ($manufacturer != 'UNKNOWN')) {
198
                            $dev->setManufacturer($manufacturer);
199
                            $dev->setManufacturer($manufacturer);
199
                        }
200
                        }
200
                        if ($size[2] == 'G') {
201
                        if ($size[2] == 'G') {
201
                            $dev->setCapacity($size[1]*1024*1024*1024);
202
                            $dev->setCapacity($size[1]*1024*1024*1024);
202
                        } else {
203
                        } else {
203
                            $dev->setCapacity($size[1]*1024*1024);
204
                            $dev->setCapacity($size[1]*1024*1024);
204
                        }
205
                        }
205
                        $memtype = '';
206
                        $memtype = '';
206
                        if (isset($mem['Type']) && (($type = $mem['Type']) != 'None') && ($type != 'N/A') && ($type != 'Not Specified') && ($type != 'Other') && ($type != 'Unknown') && ($type != '<OUT OF SPEC>')) {
207
                        if (isset($mem['Type']) && (($type = $mem['Type']) != 'None') && ($type != 'N/A') && ($type != 'Not Specified') && ($type != 'Other') && ($type != 'Unknown') && ($type != '<OUT OF SPEC>')) {
207
                            if (isset($mem['Speed']) && preg_match('/^(\d+)\s(MHz|MT\/s)/', $mem['Speed'], $speed) && ($speed[1] > 0) && (preg_match('/^(DDR\d*)(.*)/', $type, $dr) || preg_match('/^(SDR)AM(.*)/', $type, $dr))) {
208
                            if (isset($mem['Speed']) && preg_match('/^(\d+)\s(MHz|MT\/s)/', $mem['Speed'], $speed) && ($speed[1] > 0) && (preg_match('/^(DDR\d*)(.*)/', $type, $dr) || preg_match('/^(SDR)AM(.*)/', $type, $dr))) {
208
                               if (isset($mem['Minimum Voltage']) && isset($mem['Maximum Voltage']) &&
209
                               if (isset($mem['Minimum Voltage']) && isset($mem['Maximum Voltage']) &&
209
                                  preg_match('/^([\d\.]+)\sV$/', $mem['Minimum Voltage'], $minv) && preg_match('/^([\d\.]+)\sV$/', $mem['Maximum Voltage'], $maxv) &&
210
                                  preg_match('/^([\d\.]+)\sV$/', $mem['Minimum Voltage'], $minv) && preg_match('/^([\d\.]+)\sV$/', $mem['Maximum Voltage'], $maxv) &&
210
                                  ($minv[1]  > 0) && ($maxv[1] >0) && ($minv[1] < $maxv[1])) {
211
                                  ($minv[1]  > 0) && ($maxv[1] >0) && ($minv[1] < $maxv[1])) {
211
                                    $lv = 'L';
212
                                    $lv = 'L';
212
                                } else {
213
                                } else {
213
                                    $lv = '';
214
                                    $lv = '';
214
                                }
215
                                }
215
                                if (isset($dr[2])) {
216
                                if (isset($dr[2])) {
216
                                    $memtype = $dr[1].$lv.'-'.$speed[1].' '.$dr[2];
217
                                    $memtype = $dr[1].$lv.'-'.$speed[1].' '.$dr[2];
217
                                } else {
218
                                } else {
218
                                    $memtype = $dr[1].$lv.'-'.$speed[1];
219
                                    $memtype = $dr[1].$lv.'-'.$speed[1];
219
                                }
220
                                }
220
                            } else {
221
                            } else {
221
                                $memtype = $type;
222
                                $memtype = $type;
222
                            }
223
                            }
223
                        }
224
                        }
224
                        if (isset($mem['Form Factor']) && (($form = $mem['Form Factor']) != 'None') && ($form != 'N/A') && ($form != 'Not Specified') && ($form != 'Other') && ($form != 'Unknown') && !preg_match('/ '.$form.'$/', $memtype)) {
225
                        if (isset($mem['Form Factor']) && (($form = $mem['Form Factor']) != 'None') && ($form != 'N/A') && ($form != 'Not Specified') && ($form != 'Other') && ($form != 'Unknown') && !preg_match('/ '.$form.'$/', $memtype)) {
225
                            $memtype .= ' '.$form;
226
                            $memtype .= ' '.$form;
226
                        }
227
                        }
227
                        if (isset($mem['Data Width']) && isset($mem['Total Width']) &&
228
                        if (isset($mem['Data Width']) && isset($mem['Total Width']) &&
228
                           preg_match('/^(\d+)\sbits$/', $mem['Data Width'], $dataw) && preg_match('/^(\d+)\sbits$/', $mem['Total Width'], $totalw) &&
229
                           preg_match('/^(\d+)\sbits$/', $mem['Data Width'], $dataw) && preg_match('/^(\d+)\sbits$/', $mem['Total Width'], $totalw) &&
229
                           ($dataw[1]  > 0) && ($totalw[1] >0) && ($dataw[1] < $totalw[1])) {
230
                           ($dataw[1]  > 0) && ($totalw[1] >0) && ($dataw[1] < $totalw[1])) {
230
                            $memtype .= ' ECC';
231
                            $memtype .= ' ECC';
231
                        }
232
                        }
232
                        if (isset($mem['Type Detail']) && preg_match('/Registered/', $mem['Type Detail'])) {
233
                        if (isset($mem['Type Detail']) && preg_match('/Registered/', $mem['Type Detail'])) {
233
                            $memtype .= ' REG';
234
                            $memtype .= ' REG';
234
                        }
235
                        }
235
                        if (($memtype = trim($memtype)) != '') {
236
                        if (($memtype = trim($memtype)) != '') {
236
                            $dev->setProduct($memtype);
237
                            $dev->setProduct($memtype);
237
                        }
238
                        }
238
                        if (isset($mem['Configured Clock Speed']) && preg_match('/^(\d+)\s(MHz|MT\/s)$/', $mem['Configured Clock Speed'], $clock) && ($clock[1] > 0)) {
239
                        if (isset($mem['Configured Clock Speed']) && preg_match('/^(\d+)\s(MHz|MT\/s)$/', $mem['Configured Clock Speed'], $clock) && ($clock[1] > 0)) {
239
                            $dev->setSpeed($clock[1]);
240
                            $dev->setSpeed($clock[1]);
240
                        }
241
                        }
241
                        if (isset($mem['Configured Voltage']) && preg_match('/^([\d\.]+)\sV$/', $mem['Configured Voltage'], $voltage) && ($voltage[1] > 0)) {
242
                        if (isset($mem['Configured Voltage']) && preg_match('/^([\d\.]+)\sV$/', $mem['Configured Voltage'], $voltage) && ($voltage[1] > 0)) {
242
                            $dev->setVoltage($voltage[1]);
243
                            $dev->setVoltage($voltage[1]);
243
                        }
244
                        }
244
                        if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL &&
245
                        if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL &&
245
                           isset($mem['Serial Number']) && !preg_match("/^SerNum\d+$/", $serial = $mem['Serial Number']) && ($serial != 'None') && ($serial != 'Not Specified')) {
246
                           isset($mem['Serial Number']) && !preg_match("/^SerNum\d+$/", $serial = $mem['Serial Number']) && ($serial != 'None') && ($serial != 'Not Specified')) {
246
                            $dev->setSerial($serial);
247
                            $dev->setSerial($serial);
247
                        }
248
                        }
248
                    }
249
                    }
249
                    $this->sys->setMemDevices($dev);
250
                    $this->sys->setMemDevices($dev);
250
                }
251
                }
251
            }
252
            }
252
        }
253
        }
253
    }
254
    }
254
 
255
 
255
    /**
256
    /**
256
     * get the filled or unfilled (with default values) System object
257
     * get the filled or unfilled (with default values) System object
257
     *
258
     *
258
     * @see PSI_Interface_OS::getSys()
259
     * @see PSI_Interface_OS::getSys()
259
     *
260
     *
260
     * @return System
261
     * @return System
261
     */
262
     */
262
    final public function getSys()
263
    final public function getSys()
263
    {
264
    {
264
        $this->build();
265
        $this->build();
265
        if (!$this->blockname || $this->blockname==='vitals') {
266
        if (!$this->blockname || $this->blockname==='vitals') {
266
            $this->_ip();
267
            $this->_ip();
267
        }
268
        }
268
        if ((!$this->blockname || $this->blockname==='hardware') && (PSI_OS != 'WINNT') && !defined('PSI_EMU_HOSTNAME')) {
269
        if ((!$this->blockname || $this->blockname==='hardware') && (PSI_OS != 'WINNT') && !defined('PSI_EMU_HOSTNAME')) {
269
            $this->_dmimeminfo();
270
            $this->_dmimeminfo();
270
        }
271
        }
271
 
272
 
272
        return $this->sys;
273
        return $this->sys;
273
    }
274
    }
274
}
275
}
275
 
276