Subversion Repositories ALCASAR

Rev

Rev 2976 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
Line 26... Line 26...
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
Line 195... Line 195...
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
Line 251... Line 251...
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
Line 289... Line 296...
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);
Line 306... Line 313...
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)) {
Line 327... Line 334...
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)) {
Line 352... Line 359...
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)) {
Line 383... Line 390...
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;
Line 405... Line 412...
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;
Line 427... Line 434...
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;
Line 449... Line 456...
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) {
Line 483... Line 490...
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
    }
Line 509... Line 516...
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
    }
Line 535... Line 542...
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
    }
Line 561... Line 568...
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
    }
Line 587... Line 594...
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
    }
Line 613... Line 620...
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
    }
Line 625... Line 632...
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
    }
Line 665... Line 672...
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
    }
Line 677... Line 684...
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
    }
Line 691... Line 698...
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
    }
Line 703... Line 710...
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
    }
Line 744... Line 751...
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
    }
Line 775... Line 782...
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
    }
Line 802... Line 809...
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
    }
Line 829... Line 836...
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
    }
Line 856... Line 863...
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
    }
Line 883... Line 890...
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
    }
Line 910... Line 917...
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
    }
Line 937... Line 944...
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
    }
Line 964... Line 971...
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
    }
Line 991... Line 998...
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
    }
Line 1030... Line 1037...
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
    }
Line 1056... Line 1063...
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
    }
Line 1082... Line 1089...
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
    }
Line 1108... Line 1115...
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
    }
Line 1134... Line 1141...
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
    }
Line 1160... Line 1167...
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
    }
Line 1201... Line 1208...
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
    }
Line 1227... Line 1234...
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
}