Subversion Repositories ALCASAR

Rev

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

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