Subversion Repositories ALCASAR

Rev

Rev 2976 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
1
<?php
1
<?php
2
/**
2
/**
3
 * System TO class
3
 * System TO class
4
 *
4
 *
5
 * PHP version 5
5
 * PHP version 5
6
 *
6
 *
7
 * @category  PHP
7
 * @category  PHP
8
 * @package   PSI_TO
8
 * @package   PSI_TO
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.System.inc.php 255 2009-06-17 13:39:41Z bigmichi1 $
12
 * @version   SVN: $Id: class.System.inc.php 255 2009-06-17 13:39:41Z bigmichi1 $
13
 * @link      http://phpsysinfo.sourceforge.net
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
14
 */
15
 /**
15
 /**
16
 * System TO class
16
 * System TO class
17
 *
17
 *
18
 * @category  PHP
18
 * @category  PHP
19
 * @package   PSI_TO
19
 * @package   PSI_TO
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
class System
26
class System
27
{
27
{
28
    /**
28
    /**
29
     * name of the host where phpSysInfo runs
29
     * name of the host where phpSysInfo runs
30
     *
30
     *
31
     * @var String
31
     * @var string
32
     */
32
     */
33
    private $_hostname = "localhost";
33
    private $_hostname = "localhost";
34
 
34
 
35
    /**
35
    /**
36
     * ip of the host where phpSysInfo runs
36
     * ip of the host where phpSysInfo runs
37
     *
37
     *
38
     * @var String
38
     * @var string
39
     */
39
     */
40
    private $_ip = "127.0.0.1";
40
    private $_ip = "127.0.0.1";
41
 
41
 
42
    /**
42
    /**
43
     * detailed Information about the kernel
43
     * detailed information about the kernel
44
     *
44
     *
45
     * @var String
45
     * @var string
46
     */
46
     */
47
    private $_kernel = "Unknown";
47
    private $_kernel = "Unknown";
48
 
48
 
49
    /**
49
    /**
50
     * name of the distribution
50
     * name of the distribution
51
     *
51
     *
52
     * @var String
52
     * @var string
53
     */
53
     */
54
    private $_distribution = "Unknown";
54
    private $_distribution = "Unknown";
55
 
55
 
56
    /**
56
    /**
57
     * icon of the distribution (must be available in phpSysInfo)
57
     * icon of the distribution (must be available in phpSysInfo)
58
     *
58
     *
59
     * @var String
59
     * @var string
60
     */
60
     */
61
    private $_distributionIcon = "unknown.png";
61
    private $_distributionIcon = "unknown.png";
62
 
62
 
63
    /**
63
    /**
64
     * detailed Information about the machine name
64
     * detailed Information about the machine name
65
     *
65
     *
66
     * @var String
66
     * @var string
67
     */
67
     */
68
    private $_machine = "";
68
    private $_machine = "";
69
 
69
 
70
    /**
70
    /**
71
     * time in sec how long the system is running
71
     * time in sec how long the system is running
72
     *
72
     *
73
     * @var Integer
73
     * @var int
74
     */
74
     */
75
    private $_uptime = 0;
75
    private $_uptime = 0;
76
 
76
 
77
    /**
77
    /**
78
     * count of users that are currently logged in
78
     * count of users that are currently logged in
79
     *
79
     *
80
     * @var Integer
80
     * @var int
81
     */
81
     */
82
    private $_users = 0;
82
    private $_users = 0;
83
 
83
 
84
    /**
84
    /**
85
     * load of the system
85
     * load of the system
86
     *
86
     *
87
     * @var String
87
     * @var string
88
     */
88
     */
89
    private $_load = "";
89
    private $_load = "";
90
 
90
 
91
    /**
91
    /**
92
     * load of the system in percent (all cpus, if more than one)
92
     * load of the system in percent (all cpus, if more than one)
93
     *
93
     *
94
     * @var Integer
94
     * @var int
95
     */
95
     */
96
    private $_loadPercent = null;
96
    private $_loadPercent = null;
97
 
97
 
98
    /**
98
    /**
99
     * array with cpu devices
99
     * array with cpu devices
100
     *
100
     *
101
     * @see CpuDevice
101
     * @see CpuDevice
102
     *
102
     *
103
     * @var array
103
     * @var array
104
     */
104
     */
105
    private $_cpus = array();
105
    private $_cpus = array();
106
 
106
 
107
    /**
107
    /**
108
     * array with network devices
108
     * array with network devices
109
     *
109
     *
110
     * @see NetDevice
110
     * @see NetDevice
111
     *
111
     *
112
     * @var array
112
     * @var array
113
     */
113
     */
114
    private $_netDevices = array();
114
    private $_netDevices = array();
115
 
115
 
116
    /**
116
    /**
117
     * array with pci devices
117
     * array with pci devices
118
     *
118
     *
119
     * @see HWDevice
119
     * @see HWDevice
120
     *
120
     *
121
     * @var array
121
     * @var array
122
     */
122
     */
123
    private $_pciDevices = array();
123
    private $_pciDevices = array();
124
 
124
 
125
    /**
125
    /**
126
     * array with ide devices
126
     * array with ide devices
127
     *
127
     *
128
     * @see HWDevice
128
     * @see HWDevice
129
     *
129
     *
130
     * @var array
130
     * @var array
131
     */
131
     */
132
    private $_ideDevices = array();
132
    private $_ideDevices = array();
133
 
133
 
134
    /**
134
    /**
135
     * array with scsi devices
135
     * array with scsi devices
136
     *
136
     *
137
     * @see HWDevice
137
     * @see HWDevice
138
     *
138
     *
139
     * @var array
139
     * @var array
140
     */
140
     */
141
    private $_scsiDevices = array();
141
    private $_scsiDevices = array();
142
 
142
 
143
    /**
143
    /**
144
     * array with usb devices
144
     * array with usb devices
145
     *
145
     *
146
     * @see HWDevice
146
     * @see HWDevice
147
     *
147
     *
148
     * @var array
148
     * @var array
149
     */
149
     */
150
    private $_usbDevices = array();
150
    private $_usbDevices = array();
151
 
151
 
152
    /**
152
    /**
153
     * array with thunderbolt devices
153
     * array with thunderbolt devices
154
     *
154
     *
155
     * @see HWDevice
155
     * @see HWDevice
156
     *
156
     *
157
     * @var array
157
     * @var array
158
     */
158
     */
159
    private $_tbDevices = array();
159
    private $_tbDevices = array();
160
 
160
 
161
    /**
161
    /**
162
     * array with I2C devices
162
     * array with I2C devices
163
     *
163
     *
164
     * @see HWDevice
164
     * @see HWDevice
165
     *
165
     *
166
     * @var array
166
     * @var array
167
     */
167
     */
168
    private $_i2cDevices = array();
168
    private $_i2cDevices = array();
169
 
169
 
170
    /**
170
    /**
171
     * array with NVMe devices
171
     * array with NVMe devices
172
     *
172
     *
173
     * @see HWDevice
173
     * @see HWDevice
174
     *
174
     *
175
     * @var array
175
     * @var array
176
     */
176
     */
177
    private $_nvmeDevices = array();
177
    private $_nvmeDevices = array();
178
 
178
 
179
    /**
179
    /**
180
     * array with Mem devices
180
     * array with Mem devices
181
     *
181
     *
182
     * @see HWDevice
182
     * @see HWDevice
183
     *
183
     *
184
     * @var array
184
     * @var array
185
     */
185
     */
186
    private $_memDevices = array();
186
    private $_memDevices = array();
187
 
187
 
188
    /**
188
    /**
189
     * array with disk devices
189
     * array with disk devices
190
     *
190
     *
191
     * @see DiskDevice
191
     * @see DiskDevice
192
     *
192
     *
193
     * @var array
193
     * @var array
194
     */
194
     */
195
    private $_diskDevices = array();
195
    private $_diskDevices = array();
196
 
196
 
197
    /**
197
    /**
198
     * free memory in bytes
198
     * free memory in bytes
199
     *
199
     *
200
     * @var Integer
200
     * @var int
201
     */
201
     */
202
    private $_memFree = 0;
202
    private $_memFree = 0;
203
 
203
 
204
    /**
204
    /**
205
     * total memory in bytes
205
     * total memory in bytes
206
     *
206
     *
207
     * @var Integer
207
     * @var int
208
     */
208
     */
209
    private $_memTotal = 0;
209
    private $_memTotal = 0;
210
 
210
 
211
    /**
211
    /**
212
     * used memory in bytes
212
     * used memory in bytes
213
     *
213
     *
214
     * @var Integer
214
     * @var int
215
     */
215
     */
216
    private $_memUsed = 0;
216
    private $_memUsed = 0;
217
 
217
 
218
    /**
218
    /**
219
     * used memory by applications in bytes
219
     * used memory by applications in bytes
220
     *
220
     *
221
     * @var Integer
221
     * @var int
222
     */
222
     */
223
    private $_memApplication = null;
223
    private $_memApplication = null;
224
 
224
 
225
    /**
225
    /**
226
     * used memory for buffers in bytes
226
     * used memory for buffers in bytes
227
     *
227
     *
228
     * @var Integer
228
     * @var int
229
     */
229
     */
230
    private $_memBuffer = null;
230
    private $_memBuffer = null;
231
 
231
 
232
    /**
232
    /**
233
     * used memory for cache in bytes
233
     * used memory for cache in bytes
234
     *
234
     *
235
     * @var Integer
235
     * @var int
236
     */
236
     */
237
    private $_memCache = null;
237
    private $_memCache = null;
238
 
238
 
239
    /**
239
    /**
240
     * array with swap devices
240
     * array with swap devices
241
     *
241
     *
242
     * @see DiskDevice
242
     * @see DiskDevice
243
     *
243
     *
244
     * @var array
244
     * @var array
245
     */
245
     */
246
    private $_swapDevices = array();
246
    private $_swapDevices = array();
247
 
247
 
248
    /**
248
    /**
249
     * array of types of processes
249
     * array of types of processes
250
     *
250
     *
251
     * @var array
251
     * @var array
252
     */
252
     */
253
    private $_processes = array();
253
    private $_processes = array();
254
 
254
 
255
    /**
255
    /**
-
 
256
     *  array with Virtualizer information
-
 
257
     *
-
 
258
     * @var array
-
 
259
     */
-
 
260
    private $_virtualizer = array();
-
 
261
 
-
 
262
    /**
256
     * remove duplicate Entries and Count
263
     * remove duplicate Entries and Count
257
     *
264
     *
258
     * @param array $arrDev list of HWDevices
265
     * @param array $arrDev list of HWDevices
259
     *
266
     *
260
     * @see HWDevice
267
     * @see HWDevice
261
     *
268
     *
262
     * @return array
269
     * @return array
263
     */
270
     */
264
    public static function removeDupsAndCount($arrDev)
271
    public static function removeDupsAndCount($arrDev)
265
    {
272
    {
266
        $result = array();
273
        $result = array();
267
        foreach ($arrDev as $dev) {
274
        foreach ($arrDev as $dev) {
268
            if (count($result) === 0) {
275
            if (count($result) === 0) {
269
                array_push($result, $dev);
276
                array_push($result, $dev);
270
            } else {
277
            } else {
271
                $found = false;
278
                $found = false;
272
                foreach ($result as $tmp) {
279
                foreach ($result as $tmp) {
273
                    if ($dev->equals($tmp)) {
280
                    if ($dev->equals($tmp)) {
274
                        $tmp->setCount($tmp->getCount() + 1);
281
                        $tmp->setCount($tmp->getCount() + 1);
275
                        $found = true;
282
                        $found = true;
276
                        break;
283
                        break;
277
                    }
284
                    }
278
                }
285
                }
279
                if (!$found) {
286
                if (!$found) {
280
                    array_push($result, $dev);
287
                    array_push($result, $dev);
281
                }
288
                }
282
            }
289
            }
283
        }
290
        }
284
 
291
 
285
        return $result;
292
        return $result;
286
    }
293
    }
287
 
294
 
288
    /**
295
    /**
289
     * return percent of used memory
296
     * return percent of used memory
290
     *
297
     *
291
     * @see System::_memUsed
298
     * @see System::_memUsed
292
     * @see System::_memTotal
299
     * @see System::_memTotal
293
     *
300
     *
294
     * @return Integer
301
     * @return int
295
     */
302
     */
296
    public function getMemPercentUsed()
303
    public function getMemPercentUsed()
297
    {
304
    {
298
        if ($this->_memTotal > 0) {
305
        if ($this->_memTotal > 0) {
299
            return round($this->_memUsed / $this->_memTotal * 100);
306
            return round($this->_memUsed / $this->_memTotal * 100);
300
        } else {
307
        } else {
301
            return 0;
308
            return 0;
302
        }
309
        }
303
    }
310
    }
304
 
311
 
305
    /**
312
    /**
306
     * return percent of used memory for applications
313
     * return percent of used memory for applications
307
     *
314
     *
308
     * @see System::_memApplication
315
     * @see System::_memApplication
309
     * @see System::_memTotal
316
     * @see System::_memTotal
310
     *
317
     *
311
     * @return Integer
318
     * @return int
312
     */
319
     */
313
    public function getMemPercentApplication()
320
    public function getMemPercentApplication()
314
    {
321
    {
315
        if ($this->_memApplication !== null) {
322
        if ($this->_memApplication !== null) {
316
            if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
323
            if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
317
                return round($this->_memApplication / $this->_memTotal * 100);
324
                return round($this->_memApplication / $this->_memTotal * 100);
318
            } else {
325
            } else {
319
                return 0;
326
                return 0;
320
            }
327
            }
321
        } else {
328
        } else {
322
            return null;
329
            return null;
323
        }
330
        }
324
    }
331
    }
325
 
332
 
326
    /**
333
    /**
327
     * return percent of used memory for cache
334
     * return percent of used memory for cache
328
     *
335
     *
329
     * @see System::_memCache
336
     * @see System::_memCache
330
     * @see System::_memTotal
337
     * @see System::_memTotal
331
     *
338
     *
332
     * @return Integer
339
     * @return int
333
     */
340
     */
334
    public function getMemPercentCache()
341
    public function getMemPercentCache()
335
    {
342
    {
336
        if ($this->_memCache !== null) {
343
        if ($this->_memCache !== null) {
337
            if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
344
            if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
338
                if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
345
                if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
339
                    return round(($this->_memCache + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
346
                    return round(($this->_memCache + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
340
                } else {
347
                } else {
341
                    return round($this->_memCache / $this->_memTotal * 100);
348
                    return round($this->_memCache / $this->_memTotal * 100);
342
                }
349
                }
343
            } else {
350
            } else {
344
                return 0;
351
                return 0;
345
            }
352
            }
346
        } else {
353
        } else {
347
            return null;
354
            return null;
348
        }
355
        }
349
    }
356
    }
350
 
357
 
351
    /**
358
    /**
352
     * return percent of used memory for buffer
359
     * return percent of used memory for buffer
353
     *
360
     *
354
     * @see System::_memBuffer
361
     * @see System::_memBuffer
355
     * @see System::_memTotal
362
     * @see System::_memTotal
356
     *
363
     *
357
     * @return Integer
364
     * @return int
358
     */
365
     */
359
    public function getMemPercentBuffer()
366
    public function getMemPercentBuffer()
360
    {
367
    {
361
        if ($this->_memBuffer !== null) {
368
        if ($this->_memBuffer !== null) {
362
            if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
369
            if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
363
                if (($this->_memCache !== null) && ($this->_memCache > 0)) {
370
                if (($this->_memCache !== null) && ($this->_memCache > 0)) {
364
                    if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
371
                    if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
365
                        return round(($this->_memBuffer + $this->_memApplication + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentApplication() - $this->getMemPercentCache();
372
                        return round(($this->_memBuffer + $this->_memApplication + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentApplication() - $this->getMemPercentCache();
366
                    } else {
373
                    } else {
367
                        return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();
374
                        return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();
368
                    }
375
                    }
369
                } elseif (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
376
                } elseif (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
370
                    return round(($this->_memBuffer + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
377
                    return round(($this->_memBuffer + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
371
                } else {
378
                } else {
372
                    return round($this->_memBuffer / $this->_memTotal * 100);
379
                    return round($this->_memBuffer / $this->_memTotal * 100);
373
                }
380
                }
374
            } else {
381
            } else {
375
                return 0;
382
                return 0;
376
            }
383
            }
377
        } else {
384
        } else {
378
            return null;
385
            return null;
379
        }
386
        }
380
    }
387
    }
381
 
388
 
382
    /**
389
    /**
383
     * Returns total free swap space
390
     * Returns total free swap space
384
     *
391
     *
385
     * @see System::_swapDevices
392
     * @see System::_swapDevices
386
     * @see DiskDevice::getFree()
393
     * @see DiskDevice::getFree()
387
     *
394
     *
388
     * @return Integer
395
     * @return int
389
     */
396
     */
390
    public function getSwapFree()
397
    public function getSwapFree()
391
    {
398
    {
392
        if (count($this->_swapDevices) > 0) {
399
        if (count($this->_swapDevices) > 0) {
393
            $free = 0;
400
            $free = 0;
394
            foreach ($this->_swapDevices as $dev) {
401
            foreach ($this->_swapDevices as $dev) {
395
                $free += $dev->getFree();
402
                $free += $dev->getFree();
396
            }
403
            }
397
 
404
 
398
            return $free;
405
            return $free;
399
        }
406
        }
400
 
407
 
401
        return null;
408
        return null;
402
    }
409
    }
403
 
410
 
404
    /**
411
    /**
405
     * Returns total swap space
412
     * Returns total swap space
406
     *
413
     *
407
     * @see System::_swapDevices
414
     * @see System::_swapDevices
408
     * @see DiskDevice::getTotal()
415
     * @see DiskDevice::getTotal()
409
     *
416
     *
410
     * @return Integer
417
     * @return int
411
     */
418
     */
412
    public function getSwapTotal()
419
    public function getSwapTotal()
413
    {
420
    {
414
        if (count($this->_swapDevices) > 0) {
421
        if (count($this->_swapDevices) > 0) {
415
            $total = 0;
422
            $total = 0;
416
            foreach ($this->_swapDevices as $dev) {
423
            foreach ($this->_swapDevices as $dev) {
417
                $total += $dev->getTotal();
424
                $total += $dev->getTotal();
418
            }
425
            }
419
 
426
 
420
            return $total;
427
            return $total;
421
        } else {
428
        } else {
422
            return null;
429
            return null;
423
        }
430
        }
424
    }
431
    }
425
 
432
 
426
    /**
433
    /**
427
     * Returns total used swap space
434
     * Returns total used swap space
428
     *
435
     *
429
     * @see System::_swapDevices
436
     * @see System::_swapDevices
430
     * @see DiskDevice::getUsed()
437
     * @see DiskDevice::getUsed()
431
     *
438
     *
432
     * @return Integer
439
     * @return int
433
     */
440
     */
434
    public function getSwapUsed()
441
    public function getSwapUsed()
435
    {
442
    {
436
        if (count($this->_swapDevices) > 0) {
443
        if (count($this->_swapDevices) > 0) {
437
            $used = 0;
444
            $used = 0;
438
            foreach ($this->_swapDevices as $dev) {
445
            foreach ($this->_swapDevices as $dev) {
439
                $used += $dev->getUsed();
446
                $used += $dev->getUsed();
440
            }
447
            }
441
 
448
 
442
            return $used;
449
            return $used;
443
        } else {
450
        } else {
444
            return null;
451
            return null;
445
        }
452
        }
446
    }
453
    }
447
 
454
 
448
    /**
455
    /**
449
     * return percent of total swap space used
456
     * return percent of total swap space used
450
     *
457
     *
451
     * @see System::getSwapUsed()
458
     * @see System::getSwapUsed()
452
     * @see System::getSwapTotal()
459
     * @see System::getSwapTotal()
453
     *
460
     *
454
     * @return Integer
461
     * @return int
455
     */
462
     */
456
    public function getSwapPercentUsed()
463
    public function getSwapPercentUsed()
457
    {
464
    {
458
        if ($this->getSwapTotal() !== null) {
465
        if ($this->getSwapTotal() !== null) {
459
            if ($this->getSwapTotal() > 0) {
466
            if ($this->getSwapTotal() > 0) {
460
                return round($this->getSwapUsed() / $this->getSwapTotal() * 100);
467
                return round($this->getSwapUsed() / $this->getSwapTotal() * 100);
461
            } else {
468
            } else {
462
                return 0;
469
                return 0;
463
            }
470
            }
464
        } else {
471
        } else {
465
            return null;
472
            return null;
466
        }
473
        }
467
    }
474
    }
468
 
475
 
469
    /**
476
    /**
470
     * Returns $_distribution.
477
     * Returns $_distribution.
471
     *
478
     *
472
     * @see System::$_distribution
479
     * @see System::$_distribution
473
     *
480
     *
474
     * @return String
481
     * @return String
475
     */
482
     */
476
    public function getDistribution()
483
    public function getDistribution()
477
    {
484
    {
478
        return $this->_distribution;
485
        return $this->_distribution;
479
    }
486
    }
480
 
487
 
481
    /**
488
    /**
482
     * Sets $_distribution.
489
     * Sets $_distribution.
483
     *
490
     *
484
     * @param String $distribution distributionname
491
     * @param String $distribution distributionname
485
     *
492
     *
486
     * @see System::$_distribution
493
     * @see System::$_distribution
487
     *
494
     *
488
     * @return Void
495
     * @return void
489
     */
496
     */
490
    public function setDistribution($distribution)
497
    public function setDistribution($distribution)
491
    {
498
    {
492
        $this->_distribution = $distribution;
499
        $this->_distribution = $distribution;
493
    }
500
    }
494
 
501
 
495
    /**
502
    /**
496
     * Returns $_distributionIcon.
503
     * Returns $_distributionIcon.
497
     *
504
     *
498
     * @see System::$_distributionIcon
505
     * @see System::$_distributionIcon
499
     *
506
     *
500
     * @return String
507
     * @return String
501
     */
508
     */
502
    public function getDistributionIcon()
509
    public function getDistributionIcon()
503
    {
510
    {
504
        return $this->_distributionIcon;
511
        return $this->_distributionIcon;
505
    }
512
    }
506
 
513
 
507
    /**
514
    /**
508
     * Sets $_distributionIcon.
515
     * Sets $_distributionIcon.
509
     *
516
     *
510
     * @param String $distributionIcon distribution icon
517
     * @param String $distributionIcon distribution icon
511
     *
518
     *
512
     * @see System::$_distributionIcon
519
     * @see System::$_distributionIcon
513
     *
520
     *
514
     * @return Void
521
     * @return void
515
     */
522
     */
516
    public function setDistributionIcon($distributionIcon)
523
    public function setDistributionIcon($distributionIcon)
517
    {
524
    {
518
        $this->_distributionIcon = $distributionIcon;
525
        $this->_distributionIcon = $distributionIcon;
519
    }
526
    }
520
 
527
 
521
    /**
528
    /**
522
     * Returns $_hostname.
529
     * Returns $_hostname.
523
     *
530
     *
524
     * @see System::$_hostname
531
     * @see System::$_hostname
525
     *
532
     *
526
     * @return String
533
     * @return String
527
     */
534
     */
528
    public function getHostname()
535
    public function getHostname()
529
    {
536
    {
530
        return $this->_hostname;
537
        return $this->_hostname;
531
    }
538
    }
532
 
539
 
533
    /**
540
    /**
534
     * Sets $_hostname.
541
     * Sets $_hostname.
535
     *
542
     *
536
     * @param String $hostname hostname
543
     * @param String $hostname hostname
537
     *
544
     *
538
     * @see System::$_hostname
545
     * @see System::$_hostname
539
     *
546
     *
540
     * @return Void
547
     * @return void
541
     */
548
     */
542
    public function setHostname($hostname)
549
    public function setHostname($hostname)
543
    {
550
    {
544
        $this->_hostname = $hostname;
551
        $this->_hostname = $hostname;
545
    }
552
    }
546
 
553
 
547
    /**
554
    /**
548
     * Returns $_ip.
555
     * Returns $_ip.
549
     *
556
     *
550
     * @see System::$_ip
557
     * @see System::$_ip
551
     *
558
     *
552
     * @return String
559
     * @return String
553
     */
560
     */
554
    public function getIp()
561
    public function getIp()
555
    {
562
    {
556
        return $this->_ip;
563
        return $this->_ip;
557
    }
564
    }
558
 
565
 
559
    /**
566
    /**
560
     * Sets $_ip.
567
     * Sets $_ip.
561
     *
568
     *
562
     * @param String $ip IP
569
     * @param String $ip IP
563
     *
570
     *
564
     * @see System::$_ip
571
     * @see System::$_ip
565
     *
572
     *
566
     * @return Void
573
     * @return void
567
     */
574
     */
568
    public function setIp($ip)
575
    public function setIp($ip)
569
    {
576
    {
570
        $this->_ip = $ip;
577
        $this->_ip = $ip;
571
    }
578
    }
572
 
579
 
573
    /**
580
    /**
574
     * Returns $_kernel.
581
     * Returns $_kernel.
575
     *
582
     *
576
     * @see System::$_kernel
583
     * @see System::$_kernel
577
     *
584
     *
578
     * @return String
585
     * @return String
579
     */
586
     */
580
    public function getKernel()
587
    public function getKernel()
581
    {
588
    {
582
        return $this->_kernel;
589
        return $this->_kernel;
583
    }
590
    }
584
 
591
 
585
    /**
592
    /**
586
     * Sets $_kernel.
593
     * Sets $_kernel.
587
     *
594
     *
588
     * @param String $kernel kernelname
595
     * @param String $kernel kernelname
589
     *
596
     *
590
     * @see System::$_kernel
597
     * @see System::$_kernel
591
     *
598
     *
592
     * @return Void
599
     * @return void
593
     */
600
     */
594
    public function setKernel($kernel)
601
    public function setKernel($kernel)
595
    {
602
    {
596
        $this->_kernel = $kernel;
603
        $this->_kernel = $kernel;
597
    }
604
    }
598
 
605
 
599
    /**
606
    /**
600
     * Returns $_load.
607
     * Returns $_load.
601
     *
608
     *
602
     * @see System::$_load
609
     * @see System::$_load
603
     *
610
     *
604
     * @return String
611
     * @return String
605
     */
612
     */
606
    public function getLoad()
613
    public function getLoad()
607
    {
614
    {
608
        return $this->_load;
615
        return $this->_load;
609
    }
616
    }
610
 
617
 
611
    /**
618
    /**
612
     * Sets $_load.
619
     * Sets $_load.
613
     *
620
     *
614
     * @param String $load current system load
621
     * @param String $load current system load
615
     *
622
     *
616
     * @see System::$_load
623
     * @see System::$_load
617
     *
624
     *
618
     * @return Void
625
     * @return void
619
     */
626
     */
620
    public function setLoad($load)
627
    public function setLoad($load)
621
    {
628
    {
622
        $this->_load = $load;
629
        $this->_load = $load;
623
    }
630
    }
624
 
631
 
625
    /**
632
    /**
626
     * Returns $_loadPercent.
633
     * Returns $_loadPercent.
627
     *
634
     *
628
     * @see System::$_loadPercent
635
     * @see System::$_loadPercent
629
     *
636
     *
630
     * @return Integer
637
     * @return int
631
     */
638
     */
632
    public function getLoadPercent()
639
    public function getLoadPercent()
633
    {
640
    {
634
        return $this->_loadPercent;
641
        return $this->_loadPercent;
635
    }
642
    }
636
 
643
 
637
    /**
644
    /**
638
     * Sets $_loadPercent.
645
     * Sets $_loadPercent.
639
     *
646
     *
640
     * @param Integer $loadPercent load percent
647
     * @param int $loadPercent load percent
641
     *
648
     *
642
     * @see System::$_loadPercent
649
     * @see System::$_loadPercent
643
     *
650
     *
644
     * @return Void
651
     * @return void
645
     */
652
     */
646
    public function setLoadPercent($loadPercent)
653
    public function setLoadPercent($loadPercent)
647
    {
654
    {
648
        $this->_loadPercent = $loadPercent;
655
        $this->_loadPercent = $loadPercent;
649
    }
656
    }
650
 
657
 
651
    /**
658
    /**
652
     * Returns $_machine.
659
     * Returns $_machine.
653
     *
660
     *
654
     * @see System::$_machine
661
     * @see System::$_machine
655
     *
662
     *
656
     * @return String
663
     * @return String
657
     */
664
     */
658
    public function getMachine()
665
    public function getMachine()
659
    {
666
    {
660
        return $this->_machine;
667
        return $this->_machine;
661
    }
668
    }
662
 
669
 
663
    /**
670
    /**
664
     * Sets $_machine.
671
     * Sets $_machine.
665
     *
672
     *
666
     * @param string $machine machine
673
     * @param string $machine machine
667
     *
674
     *
668
     * @see System::$_machine
675
     * @see System::$_machine
669
     *
676
     *
670
     * @return Void
677
     * @return void
671
     */
678
     */
672
    public function setMachine($machine)
679
    public function setMachine($machine)
673
    {
680
    {
674
        $this->_machine = $machine;
681
        $this->_machine = $machine;
675
    }
682
    }
676
 
683
 
677
    /**
684
    /**
678
     * Returns $_uptime.
685
     * Returns $_uptime.
679
     *
686
     *
680
     * @see System::$_uptime
687
     * @see System::$_uptime
681
     *
688
     *
682
     * @return Integer
689
     * @return int
683
     */
690
     */
684
    public function getUptime()
691
    public function getUptime()
685
    {
692
    {
686
        return $this->_uptime;
693
        return $this->_uptime;
687
    }
694
    }
688
 
695
 
689
    /**
696
    /**
690
     * Sets $_uptime.
697
     * Sets $_uptime.
691
     *
698
     *
692
     * @param integer $uptime uptime
699
     * @param integer $uptime uptime
693
     *
700
     *
694
     * @see System::$_uptime
701
     * @see System::$_uptime
695
     *
702
     *
696
     * @return Void
703
     * @return void
697
     */
704
     */
698
    public function setUptime($uptime)
705
    public function setUptime($uptime)
699
    {
706
    {
700
        $this->_uptime = $uptime;
707
        $this->_uptime = $uptime;
701
    }
708
    }
702
 
709
 
703
    /**
710
    /**
704
     * Returns $_users.
711
     * Returns $_users.
705
     *
712
     *
706
     * @see System::$_users
713
     * @see System::$_users
707
     *
714
     *
708
     * @return Integer
715
     * @return int
709
     */
716
     */
710
    public function getUsers()
717
    public function getUsers()
711
    {
718
    {
712
        return $this->_users;
719
        return $this->_users;
713
    }
720
    }
714
 
721
 
715
    /**
722
    /**
716
     * Sets $_users.
723
     * Sets $_users.
717
     *
724
     *
718
     * @param Integer $users user count
725
     * @param int $users user count
719
     *
726
     *
720
     * @see System::$_users
727
     * @see System::$_users
721
     *
728
     *
722
     * @return Void
729
     * @return void
723
     */
730
     */
724
    public function setUsers($users)
731
    public function setUsers($users)
725
    {
732
    {
726
        $this->_users = $users;
733
        $this->_users = $users;
727
    }
734
    }
728
 
735
 
729
    /**
736
    /**
730
     * Returns $_cpus.
737
     * Returns $_cpus.
731
     *
738
     *
732
     * @see System::$_cpus
739
     * @see System::$_cpus
733
     *
740
     *
734
     * @return array
741
     * @return array
735
     */
742
     */
736
    public function getCpus()
743
    public function getCpus()
737
    {
744
    {
738
        return $this->_cpus;
745
        return $this->_cpus;
739
    }
746
    }
740
 
747
 
741
    /**
748
    /**
742
     * Sets $_cpus.
749
     * Sets $_cpus.
743
     *
750
     *
744
     * @param CpuDevice $cpus cpu device
751
     * @param CpuDevice $cpus cpu device
745
     *
752
     *
746
     * @see System::$_cpus
753
     * @see System::$_cpus
747
     * @see CpuDevice
754
     * @see CpuDevice
748
     *
755
     *
749
     * @return Void
756
     * @return void
750
     */
757
     */
751
    public function setCpus($cpus)
758
    public function setCpus($cpus)
752
    {
759
    {
753
        array_push($this->_cpus, $cpus);
760
        array_push($this->_cpus, $cpus);
754
    }
761
    }
755
 
762
 
756
    /**
763
    /**
757
     * Returns $_netDevices.
764
     * Returns $_netDevices.
758
     *
765
     *
759
     * @see System::$_netDevices
766
     * @see System::$_netDevices
760
     *
767
     *
761
     * @return array
768
     * @return array
762
     */
769
     */
763
    public function getNetDevices()
770
    public function getNetDevices()
764
    {
771
    {
765
        if (defined('PSI_SORT_NETWORK_INTERFACES_LIST') && PSI_SORT_NETWORK_INTERFACES_LIST) {
772
        if (defined('PSI_SORT_NETWORK_INTERFACES_LIST') && PSI_SORT_NETWORK_INTERFACES_LIST) {
766
            usort($this->_netDevices, array('CommonFunctions', 'name_natural_compare'));
773
            usort($this->_netDevices, array('CommonFunctions', 'name_natural_compare'));
767
        }
774
        }
768
 
775
 
769
        return $this->_netDevices;
776
        return $this->_netDevices;
770
    }
777
    }
771
 
778
 
772
    /**
779
    /**
773
     * Sets $_netDevices.
780
     * Sets $_netDevices.
774
     *
781
     *
775
     * @param NetDevice $netDevices network device
782
     * @param NetDevice $netDevices network device
776
     *
783
     *
777
     * @see System::$_netDevices
784
     * @see System::$_netDevices
778
     * @see NetDevice
785
     * @see NetDevice
779
     *
786
     *
780
     * @return Void
787
     * @return void
781
     */
788
     */
782
    public function setNetDevices($netDevices)
789
    public function setNetDevices($netDevices)
783
    {
790
    {
784
        array_push($this->_netDevices, $netDevices);
791
        array_push($this->_netDevices, $netDevices);
785
    }
792
    }
786
 
793
 
787
    /**
794
    /**
788
     * Returns $_pciDevices.
795
     * Returns $_pciDevices.
789
     *
796
     *
790
     * @see System::$_pciDevices
797
     * @see System::$_pciDevices
791
     *
798
     *
792
     * @return array
799
     * @return array
793
     */
800
     */
794
    public function getPciDevices()
801
    public function getPciDevices()
795
    {
802
    {
796
        return $this->_pciDevices;
803
        return $this->_pciDevices;
797
    }
804
    }
798
 
805
 
799
    /**
806
    /**
800
     * Sets $_pciDevices.
807
     * Sets $_pciDevices.
801
     *
808
     *
802
     * @param HWDevice $pciDevices pci device
809
     * @param HWDevice $pciDevices pci device
803
     *
810
     *
804
     * @see System::$_pciDevices
811
     * @see System::$_pciDevices
805
     * @see HWDevice
812
     * @see HWDevice
806
     *
813
     *
807
     * @return Void
814
     * @return void
808
     */
815
     */
809
    public function setPciDevices($pciDevices)
816
    public function setPciDevices($pciDevices)
810
    {
817
    {
811
        array_push($this->_pciDevices, $pciDevices);
818
        array_push($this->_pciDevices, $pciDevices);
812
    }
819
    }
813
 
820
 
814
    /**
821
    /**
815
     * Returns $_ideDevices.
822
     * Returns $_ideDevices.
816
     *
823
     *
817
     * @see System::$_ideDevices
824
     * @see System::$_ideDevices
818
     *
825
     *
819
     * @return array
826
     * @return array
820
     */
827
     */
821
    public function getIdeDevices()
828
    public function getIdeDevices()
822
    {
829
    {
823
        return $this->_ideDevices;
830
        return $this->_ideDevices;
824
    }
831
    }
825
 
832
 
826
    /**
833
    /**
827
     * Sets $_ideDevices.
834
     * Sets $_ideDevices.
828
     *
835
     *
829
     * @param HWDevice $ideDevices ide device
836
     * @param HWDevice $ideDevices ide device
830
     *
837
     *
831
     * @see System::$_ideDevices
838
     * @see System::$_ideDevices
832
     * @see HWDevice
839
     * @see HWDevice
833
     *
840
     *
834
     * @return Void
841
     * @return void
835
     */
842
     */
836
    public function setIdeDevices($ideDevices)
843
    public function setIdeDevices($ideDevices)
837
    {
844
    {
838
        array_push($this->_ideDevices, $ideDevices);
845
        array_push($this->_ideDevices, $ideDevices);
839
    }
846
    }
840
 
847
 
841
    /**
848
    /**
842
     * Returns $_scsiDevices.
849
     * Returns $_scsiDevices.
843
     *
850
     *
844
     * @see System::$_scsiDevices
851
     * @see System::$_scsiDevices
845
     *
852
     *
846
     * @return array
853
     * @return array
847
     */
854
     */
848
    public function getScsiDevices()
855
    public function getScsiDevices()
849
    {
856
    {
850
        return $this->_scsiDevices;
857
        return $this->_scsiDevices;
851
    }
858
    }
852
 
859
 
853
    /**
860
    /**
854
     * Sets $_scsiDevices.
861
     * Sets $_scsiDevices.
855
     *
862
     *
856
     * @param HWDevice $scsiDevices scsi devices
863
     * @param HWDevice $scsiDevices scsi devices
857
     *
864
     *
858
     * @see System::$_scsiDevices
865
     * @see System::$_scsiDevices
859
     * @see HWDevice
866
     * @see HWDevice
860
     *
867
     *
861
     * @return Void
868
     * @return void
862
     */
869
     */
863
    public function setScsiDevices($scsiDevices)
870
    public function setScsiDevices($scsiDevices)
864
    {
871
    {
865
        array_push($this->_scsiDevices, $scsiDevices);
872
        array_push($this->_scsiDevices, $scsiDevices);
866
    }
873
    }
867
 
874
 
868
    /**
875
    /**
869
     * Returns $_usbDevices.
876
     * Returns $_usbDevices.
870
     *
877
     *
871
     * @see System::$_usbDevices
878
     * @see System::$_usbDevices
872
     *
879
     *
873
     * @return array
880
     * @return array
874
     */
881
     */
875
    public function getUsbDevices()
882
    public function getUsbDevices()
876
    {
883
    {
877
        return $this->_usbDevices;
884
        return $this->_usbDevices;
878
    }
885
    }
879
 
886
 
880
    /**
887
    /**
881
     * Sets $_usbDevices.
888
     * Sets $_usbDevices.
882
     *
889
     *
883
     * @param HWDevice $usbDevices usb device
890
     * @param HWDevice $usbDevices usb device
884
     *
891
     *
885
     * @see System::$_usbDevices
892
     * @see System::$_usbDevices
886
     * @see HWDevice
893
     * @see HWDevice
887
     *
894
     *
888
     * @return Void
895
     * @return void
889
     */
896
     */
890
    public function setUsbDevices($usbDevices)
897
    public function setUsbDevices($usbDevices)
891
    {
898
    {
892
        array_push($this->_usbDevices, $usbDevices);
899
        array_push($this->_usbDevices, $usbDevices);
893
    }
900
    }
894
 
901
 
895
    /**
902
    /**
896
     * Returns $_tbDevices.
903
     * Returns $_tbDevices.
897
     *
904
     *
898
     * @see System::$_tbDevices
905
     * @see System::$_tbDevices
899
     *
906
     *
900
     * @return array
907
     * @return array
901
     */
908
     */
902
    public function getTbDevices()
909
    public function getTbDevices()
903
    {
910
    {
904
        return $this->_tbDevices;
911
        return $this->_tbDevices;
905
    }
912
    }
906
 
913
 
907
    /**
914
    /**
908
     * Sets $_tbDevices.
915
     * Sets $_tbDevices.
909
     *
916
     *
910
     * @param HWDevice $tbDevices thunderbolt device
917
     * @param HWDevice $tbDevices thunderbolt device
911
     *
918
     *
912
     * @see System::$_tbDevices
919
     * @see System::$_tbDevices
913
     * @see HWDevice
920
     * @see HWDevice
914
     *
921
     *
915
     * @return Void
922
     * @return void
916
     */
923
     */
917
    public function setTbDevices($tbDevices)
924
    public function setTbDevices($tbDevices)
918
    {
925
    {
919
        array_push($this->_tbDevices, $tbDevices);
926
        array_push($this->_tbDevices, $tbDevices);
920
    }
927
    }
921
 
928
 
922
    /**
929
    /**
923
     * Returns $_i2cDevices.
930
     * Returns $_i2cDevices.
924
     *
931
     *
925
     * @see System::$_i2cDevices
932
     * @see System::$_i2cDevices
926
     *
933
     *
927
     * @return array
934
     * @return array
928
     */
935
     */
929
    public function getI2cDevices()
936
    public function getI2cDevices()
930
    {
937
    {
931
        return $this->_i2cDevices;
938
        return $this->_i2cDevices;
932
    }
939
    }
933
 
940
 
934
    /**
941
    /**
935
     * Sets $_i2cDevices.
942
     * Sets $_i2cDevices.
936
     *
943
     *
937
     * @param HWDevice $i2cDevices I2C device
944
     * @param HWDevice $i2cDevices I2C device
938
     *
945
     *
939
     * @see System::$_i2cDevices
946
     * @see System::$_i2cDevices
940
     * @see HWDevice
947
     * @see HWDevice
941
     *
948
     *
942
     * @return Void
949
     * @return void
943
     */
950
     */
944
    public function setI2cDevices($i2cDevices)
951
    public function setI2cDevices($i2cDevices)
945
    {
952
    {
946
        array_push($this->_i2cDevices, $i2cDevices);
953
        array_push($this->_i2cDevices, $i2cDevices);
947
    }
954
    }
948
 
955
 
949
    /**
956
    /**
950
     * Returns $_nvmeDevices.
957
     * Returns $_nvmeDevices.
951
     *
958
     *
952
     * @see System::$_nvmeDevices
959
     * @see System::$_nvmeDevices
953
     *
960
     *
954
     * @return array
961
     * @return array
955
     */
962
     */
956
    public function getNvmeDevices()
963
    public function getNvmeDevices()
957
    {
964
    {
958
        return $this->_nvmeDevices;
965
        return $this->_nvmeDevices;
959
    }
966
    }
960
 
967
 
961
    /**
968
    /**
962
     * Sets $_nvmeDevices.
969
     * Sets $_nvmeDevices.
963
     *
970
     *
964
     * @param HWDevice $nvmeDevices NVMe device
971
     * @param HWDevice $nvmeDevices NVMe device
965
     *
972
     *
966
     * @see System::$_nvmeDevices
973
     * @see System::$_nvmeDevices
967
     * @see HWDevice
974
     * @see HWDevice
968
     *
975
     *
969
     * @return Void
976
     * @return void
970
     */
977
     */
971
    public function setNvmeDevices($nvmeDevices)
978
    public function setNvmeDevices($nvmeDevices)
972
    {
979
    {
973
        array_push($this->_nvmeDevices, $nvmeDevices);
980
        array_push($this->_nvmeDevices, $nvmeDevices);
974
    }
981
    }
975
 
982
 
976
    /**
983
    /**
977
     * Returns $_memDevices.
984
     * Returns $_memDevices.
978
     *
985
     *
979
     * @see System::$_memDevices
986
     * @see System::$_memDevices
980
     *
987
     *
981
     * @return array
988
     * @return array
982
     */
989
     */
983
    public function getMemDevices()
990
    public function getMemDevices()
984
    {
991
    {
985
        return $this->_memDevices;
992
        return $this->_memDevices;
986
    }
993
    }
987
 
994
 
988
    /**
995
    /**
989
     * Sets $_memDevices.
996
     * Sets $_memDevices.
990
     *
997
     *
991
     * @param HWDevice $memDevices mem device
998
     * @param HWDevice $memDevices mem device
992
     *
999
     *
993
     * @see System::$_memDevices
1000
     * @see System::$_memDevices
994
     * @see HWDevice
1001
     * @see HWDevice
995
     *
1002
     *
996
     * @return Void
1003
     * @return void
997
     */
1004
     */
998
    public function setMemDevices($memDevices)
1005
    public function setMemDevices($memDevices)
999
    {
1006
    {
1000
        array_push($this->_memDevices, $memDevices);
1007
        array_push($this->_memDevices, $memDevices);
1001
    }
1008
    }
1002
 
1009
 
1003
    /**
1010
    /**
1004
     * Returns $_diskDevices.
1011
     * Returns $_diskDevices.
1005
     *
1012
     *
1006
     * @see System::$_diskDevices
1013
     * @see System::$_diskDevices
1007
     *
1014
     *
1008
     * @return array
1015
     * @return array
1009
     */
1016
     */
1010
    public function getDiskDevices()
1017
    public function getDiskDevices()
1011
    {
1018
    {
1012
        return $this->_diskDevices;
1019
        return $this->_diskDevices;
1013
    }
1020
    }
1014
 
1021
 
1015
    /**
1022
    /**
1016
     * Sets $_diskDevices.
1023
     * Sets $_diskDevices.
1017
     *
1024
     *
1018
     * @param DiskDevice $diskDevices disk device
1025
     * @param DiskDevice $diskDevices disk device
1019
     *
1026
     *
1020
     * @see System::$_diskDevices
1027
     * @see System::$_diskDevices
1021
     * @see DiskDevice
1028
     * @see DiskDevice
1022
     *
1029
     *
1023
     * @return void
1030
     * @return void
1024
     */
1031
     */
1025
    public function setDiskDevices($diskDevices)
1032
    public function setDiskDevices($diskDevices)
1026
    {
1033
    {
1027
        array_push($this->_diskDevices, $diskDevices);
1034
        array_push($this->_diskDevices, $diskDevices);
1028
    }
1035
    }
1029
 
1036
 
1030
    /**
1037
    /**
1031
     * Returns $_memApplication.
1038
     * Returns $_memApplication.
1032
     *
1039
     *
1033
     * @see System::$_memApplication
1040
     * @see System::$_memApplication
1034
     *
1041
     *
1035
     * @return Integer
1042
     * @return int
1036
     */
1043
     */
1037
    public function getMemApplication()
1044
    public function getMemApplication()
1038
    {
1045
    {
1039
        return $this->_memApplication;
1046
        return $this->_memApplication;
1040
    }
1047
    }
1041
 
1048
 
1042
    /**
1049
    /**
1043
     * Sets $_memApplication.
1050
     * Sets $_memApplication.
1044
     *
1051
     *
1045
     * @param Integer $memApplication application memory
1052
     * @param int $memApplication application memory
1046
     *
1053
     *
1047
     * @see System::$_memApplication
1054
     * @see System::$_memApplication
1048
     *
1055
     *
1049
     * @return Void
1056
     * @return void
1050
     */
1057
     */
1051
    public function setMemApplication($memApplication)
1058
    public function setMemApplication($memApplication)
1052
    {
1059
    {
1053
        $this->_memApplication = $memApplication;
1060
        $this->_memApplication = $memApplication;
1054
    }
1061
    }
1055
 
1062
 
1056
    /**
1063
    /**
1057
     * Returns $_memBuffer.
1064
     * Returns $_memBuffer.
1058
     *
1065
     *
1059
     * @see System::$_memBuffer
1066
     * @see System::$_memBuffer
1060
     *
1067
     *
1061
     * @return Integer
1068
     * @return int
1062
     */
1069
     */
1063
    public function getMemBuffer()
1070
    public function getMemBuffer()
1064
    {
1071
    {
1065
        return $this->_memBuffer;
1072
        return $this->_memBuffer;
1066
    }
1073
    }
1067
 
1074
 
1068
    /**
1075
    /**
1069
     * Sets $_memBuffer.
1076
     * Sets $_memBuffer.
1070
     *
1077
     *
1071
     * @param Integer $memBuffer buffer memory
1078
     * @param int $memBuffer buffer memory
1072
     *
1079
     *
1073
     * @see System::$_memBuffer
1080
     * @see System::$_memBuffer
1074
     *
1081
     *
1075
     * @return Void
1082
     * @return void
1076
     */
1083
     */
1077
    public function setMemBuffer($memBuffer)
1084
    public function setMemBuffer($memBuffer)
1078
    {
1085
    {
1079
        $this->_memBuffer = $memBuffer;
1086
        $this->_memBuffer = $memBuffer;
1080
    }
1087
    }
1081
 
1088
 
1082
    /**
1089
    /**
1083
     * Returns $_memCache.
1090
     * Returns $_memCache.
1084
     *
1091
     *
1085
     * @see System::$_memCache
1092
     * @see System::$_memCache
1086
     *
1093
     *
1087
     * @return Integer
1094
     * @return int
1088
     */
1095
     */
1089
    public function getMemCache()
1096
    public function getMemCache()
1090
    {
1097
    {
1091
        return $this->_memCache;
1098
        return $this->_memCache;
1092
    }
1099
    }
1093
 
1100
 
1094
    /**
1101
    /**
1095
     * Sets $_memCache.
1102
     * Sets $_memCache.
1096
     *
1103
     *
1097
     * @param Integer $memCache cache memory
1104
     * @param int $memCache cache memory
1098
     *
1105
     *
1099
     * @see System::$_memCache
1106
     * @see System::$_memCache
1100
     *
1107
     *
1101
     * @return Void
1108
     * @return void
1102
     */
1109
     */
1103
    public function setMemCache($memCache)
1110
    public function setMemCache($memCache)
1104
    {
1111
    {
1105
        $this->_memCache = $memCache;
1112
        $this->_memCache = $memCache;
1106
    }
1113
    }
1107
 
1114
 
1108
    /**
1115
    /**
1109
     * Returns $_memFree.
1116
     * Returns $_memFree.
1110
     *
1117
     *
1111
     * @see System::$_memFree
1118
     * @see System::$_memFree
1112
     *
1119
     *
1113
     * @return Integer
1120
     * @return int
1114
     */
1121
     */
1115
    public function getMemFree()
1122
    public function getMemFree()
1116
    {
1123
    {
1117
        return $this->_memFree;
1124
        return $this->_memFree;
1118
    }
1125
    }
1119
 
1126
 
1120
    /**
1127
    /**
1121
     * Sets $_memFree.
1128
     * Sets $_memFree.
1122
     *
1129
     *
1123
     * @param Integer $memFree free memory
1130
     * @param int $memFree free memory
1124
     *
1131
     *
1125
     * @see System::$_memFree
1132
     * @see System::$_memFree
1126
     *
1133
     *
1127
     * @return Void
1134
     * @return void
1128
     */
1135
     */
1129
    public function setMemFree($memFree)
1136
    public function setMemFree($memFree)
1130
    {
1137
    {
1131
        $this->_memFree = $memFree;
1138
        $this->_memFree = $memFree;
1132
    }
1139
    }
1133
 
1140
 
1134
    /**
1141
    /**
1135
     * Returns $_memTotal.
1142
     * Returns $_memTotal.
1136
     *
1143
     *
1137
     * @see System::$_memTotal
1144
     * @see System::$_memTotal
1138
     *
1145
     *
1139
     * @return Integer
1146
     * @return int
1140
     */
1147
     */
1141
    public function getMemTotal()
1148
    public function getMemTotal()
1142
    {
1149
    {
1143
        return $this->_memTotal;
1150
        return $this->_memTotal;
1144
    }
1151
    }
1145
 
1152
 
1146
    /**
1153
    /**
1147
     * Sets $_memTotal.
1154
     * Sets $_memTotal.
1148
     *
1155
     *
1149
     * @param Integer $memTotal total memory
1156
     * @param int $memTotal total memory
1150
     *
1157
     *
1151
     * @see System::$_memTotal
1158
     * @see System::$_memTotal
1152
     *
1159
     *
1153
     * @return Void
1160
     * @return void
1154
     */
1161
     */
1155
    public function setMemTotal($memTotal)
1162
    public function setMemTotal($memTotal)
1156
    {
1163
    {
1157
        $this->_memTotal = $memTotal;
1164
        $this->_memTotal = $memTotal;
1158
    }
1165
    }
1159
 
1166
 
1160
    /**
1167
    /**
1161
     * Returns $_memUsed.
1168
     * Returns $_memUsed.
1162
     *
1169
     *
1163
     * @see System::$_memUsed
1170
     * @see System::$_memUsed
1164
     *
1171
     *
1165
     * @return Integer
1172
     * @return int
1166
     */
1173
     */
1167
    public function getMemUsed()
1174
    public function getMemUsed()
1168
    {
1175
    {
1169
        return $this->_memUsed;
1176
        return $this->_memUsed;
1170
    }
1177
    }
1171
 
1178
 
1172
    /**
1179
    /**
1173
     * Sets $_memUsed.
1180
     * Sets $_memUsed.
1174
     *
1181
     *
1175
     * @param Integer $memUsed used memory
1182
     * @param int $memUsed used memory
1176
     *
1183
     *
1177
     * @see System::$_memUsed
1184
     * @see System::$_memUsed
1178
     *
1185
     *
1179
     * @return Void
1186
     * @return void
1180
     */
1187
     */
1181
    public function setMemUsed($memUsed)
1188
    public function setMemUsed($memUsed)
1182
    {
1189
    {
1183
        $this->_memUsed = $memUsed;
1190
        $this->_memUsed = $memUsed;
1184
    }
1191
    }
1185
 
1192
 
1186
    /**
1193
    /**
1187
     * Returns $_swapDevices.
1194
     * Returns $_swapDevices.
1188
     *
1195
     *
1189
     * @see System::$_swapDevices
1196
     * @see System::$_swapDevices
1190
     *
1197
     *
1191
     * @return array
1198
     * @return array
1192
     */
1199
     */
1193
    public function getSwapDevices()
1200
    public function getSwapDevices()
1194
    {
1201
    {
1195
        return $this->_swapDevices;
1202
        return $this->_swapDevices;
1196
    }
1203
    }
1197
 
1204
 
1198
    /**
1205
    /**
1199
     * Sets $_swapDevices.
1206
     * Sets $_swapDevices.
1200
     *
1207
     *
1201
     * @param DiskDevice $swapDevices swap devices
1208
     * @param DiskDevice $swapDevices swap devices
1202
     *
1209
     *
1203
     * @see System::$_swapDevices
1210
     * @see System::$_swapDevices
1204
     * @see DiskDevice
1211
     * @see DiskDevice
1205
     *
1212
     *
1206
     * @return Void
1213
     * @return void
1207
     */
1214
     */
1208
    public function setSwapDevices($swapDevices)
1215
    public function setSwapDevices($swapDevices)
1209
    {
1216
    {
1210
        array_push($this->_swapDevices, $swapDevices);
1217
        array_push($this->_swapDevices, $swapDevices);
1211
    }
1218
    }
1212
 
1219
 
1213
    /**
1220
    /**
1214
     * Returns $_processes.
1221
     * Returns $_processes.
1215
     *
1222
     *
1216
     * @see System::$_processes
1223
     * @see System::$_processes
1217
     *
1224
     *
1218
     * @return array
1225
     * @return array
1219
     */
1226
     */
1220
    public function getProcesses()
1227
    public function getProcesses()
1221
    {
1228
    {
1222
        return $this->_processes;
1229
        return $this->_processes;
1223
    }
1230
    }
1224
 
1231
 
1225
    /**
1232
    /**
1226
     * Sets $_proceses.
1233
     * Sets $_proceses.
1227
     *
1234
     *
1228
     * @param $processes array of types of processes
1235
     * @param $processes array of types of processes
1229
     *
1236
     *
1230
     * @see System::$_processes
1237
     * @see System::$_processes
1231
     *
1238
     *
1232
     * @return Void
1239
     * @return void
1233
     */
1240
     */
1234
    public function setProcesses($processes)
1241
    public function setProcesses($processes)
1235
    {
1242
    {
1236
        $this->_processes = $processes;
1243
        $this->_processes = $processes;
1237
/*
1244
/*
1238
        foreach ($processes as $proc_type=>$proc_count) {
1245
        foreach ($processes as $proc_type=>$proc_count) {
1239
            $this->_processes[$proc_type] = $proc_count;
1246
            $this->_processes[$proc_type] = $proc_count;
1240
        }
1247
        }
1241
*/
1248
*/
1242
    }
1249
    }
-
 
1250
 
-
 
1251
    /**
-
 
1252
     * Returns $_virtualizer.
-
 
1253
     *
-
 
1254
     * @see System::$_virtualizer
-
 
1255
     *
-
 
1256
     * @return array
-
 
1257
     */
-
 
1258
    public function getVirtualizer()
-
 
1259
    {
-
 
1260
        return $this->_virtualizer;
-
 
1261
    }
-
 
1262
 
-
 
1263
    /**
-
 
1264
     * Sets $_virtualizer.
-
 
1265
     *
-
 
1266
     * @param String      $virtualizer virtualizername
-
 
1267
     * @param Bool|String $value       true, false or virtualizername to replace
-
 
1268
     *
-
 
1269
     * @see System::$_virtualizer
-
 
1270
     *
-
 
1271
     * @return void
-
 
1272
     */
-
 
1273
    public function setVirtualizer($virtualizer, $value = true)
-
 
1274
    {
-
 
1275
        if (!isset($this->_virtualizer[$virtualizer])) {
-
 
1276
            if (is_bool($value)) {
-
 
1277
                $this->_virtualizer[$virtualizer] = $value;
-
 
1278
            } else { // replace the virtualizer with another
-
 
1279
                $this->_virtualizer[$virtualizer] = true;
-
 
1280
                $this->_virtualizer[$value] = false;
-
 
1281
            }
-
 
1282
        }
-
 
1283
    }
1243
}
1284
}
1244
 
1285