28,7 → 28,7 |
/** |
* name of the host where phpSysInfo runs |
* |
* @var String |
* @var string |
*/ |
private $_hostname = "localhost"; |
|
35,14 → 35,14 |
/** |
* ip of the host where phpSysInfo runs |
* |
* @var String |
* @var string |
*/ |
private $_ip = "127.0.0.1"; |
|
/** |
* detailed Information about the kernel |
* detailed information about the kernel |
* |
* @var String |
* @var string |
*/ |
private $_kernel = "Unknown"; |
|
49,7 → 49,7 |
/** |
* name of the distribution |
* |
* @var String |
* @var string |
*/ |
private $_distribution = "Unknown"; |
|
56,7 → 56,7 |
/** |
* icon of the distribution (must be available in phpSysInfo) |
* |
* @var String |
* @var string |
*/ |
private $_distributionIcon = "unknown.png"; |
|
63,7 → 63,7 |
/** |
* detailed Information about the machine name |
* |
* @var String |
* @var string |
*/ |
private $_machine = ""; |
|
70,7 → 70,7 |
/** |
* time in sec how long the system is running |
* |
* @var Integer |
* @var int |
*/ |
private $_uptime = 0; |
|
77,7 → 77,7 |
/** |
* count of users that are currently logged in |
* |
* @var Integer |
* @var int |
*/ |
private $_users = 0; |
|
84,7 → 84,7 |
/** |
* load of the system |
* |
* @var String |
* @var string |
*/ |
private $_load = ""; |
|
91,7 → 91,7 |
/** |
* load of the system in percent (all cpus, if more than one) |
* |
* @var Integer |
* @var int |
*/ |
private $_loadPercent = null; |
|
197,7 → 197,7 |
/** |
* free memory in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memFree = 0; |
|
204,7 → 204,7 |
/** |
* total memory in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memTotal = 0; |
|
211,7 → 211,7 |
/** |
* used memory in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memUsed = 0; |
|
218,7 → 218,7 |
/** |
* used memory by applications in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memApplication = null; |
|
225,7 → 225,7 |
/** |
* used memory for buffers in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memBuffer = null; |
|
232,7 → 232,7 |
/** |
* used memory for cache in bytes |
* |
* @var Integer |
* @var int |
*/ |
private $_memCache = null; |
|
253,6 → 253,13 |
private $_processes = array(); |
|
/** |
* array with Virtualizer information |
* |
* @var array |
*/ |
private $_virtualizer = array(); |
|
/** |
* remove duplicate Entries and Count |
* |
* @param array $arrDev list of HWDevices |
291,7 → 298,7 |
* @see System::_memUsed |
* @see System::_memTotal |
* |
* @return Integer |
* @return int |
*/ |
public function getMemPercentUsed() |
{ |
308,7 → 315,7 |
* @see System::_memApplication |
* @see System::_memTotal |
* |
* @return Integer |
* @return int |
*/ |
public function getMemPercentApplication() |
{ |
329,7 → 336,7 |
* @see System::_memCache |
* @see System::_memTotal |
* |
* @return Integer |
* @return int |
*/ |
public function getMemPercentCache() |
{ |
354,7 → 361,7 |
* @see System::_memBuffer |
* @see System::_memTotal |
* |
* @return Integer |
* @return int |
*/ |
public function getMemPercentBuffer() |
{ |
385,7 → 392,7 |
* @see System::_swapDevices |
* @see DiskDevice::getFree() |
* |
* @return Integer |
* @return int |
*/ |
public function getSwapFree() |
{ |
407,7 → 414,7 |
* @see System::_swapDevices |
* @see DiskDevice::getTotal() |
* |
* @return Integer |
* @return int |
*/ |
public function getSwapTotal() |
{ |
429,7 → 436,7 |
* @see System::_swapDevices |
* @see DiskDevice::getUsed() |
* |
* @return Integer |
* @return int |
*/ |
public function getSwapUsed() |
{ |
451,7 → 458,7 |
* @see System::getSwapUsed() |
* @see System::getSwapTotal() |
* |
* @return Integer |
* @return int |
*/ |
public function getSwapPercentUsed() |
{ |
485,7 → 492,7 |
* |
* @see System::$_distribution |
* |
* @return Void |
* @return void |
*/ |
public function setDistribution($distribution) |
{ |
511,7 → 518,7 |
* |
* @see System::$_distributionIcon |
* |
* @return Void |
* @return void |
*/ |
public function setDistributionIcon($distributionIcon) |
{ |
537,7 → 544,7 |
* |
* @see System::$_hostname |
* |
* @return Void |
* @return void |
*/ |
public function setHostname($hostname) |
{ |
563,7 → 570,7 |
* |
* @see System::$_ip |
* |
* @return Void |
* @return void |
*/ |
public function setIp($ip) |
{ |
589,7 → 596,7 |
* |
* @see System::$_kernel |
* |
* @return Void |
* @return void |
*/ |
public function setKernel($kernel) |
{ |
615,7 → 622,7 |
* |
* @see System::$_load |
* |
* @return Void |
* @return void |
*/ |
public function setLoad($load) |
{ |
627,7 → 634,7 |
* |
* @see System::$_loadPercent |
* |
* @return Integer |
* @return int |
*/ |
public function getLoadPercent() |
{ |
637,11 → 644,11 |
/** |
* Sets $_loadPercent. |
* |
* @param Integer $loadPercent load percent |
* @param int $loadPercent load percent |
* |
* @see System::$_loadPercent |
* |
* @return Void |
* @return void |
*/ |
public function setLoadPercent($loadPercent) |
{ |
667,7 → 674,7 |
* |
* @see System::$_machine |
* |
* @return Void |
* @return void |
*/ |
public function setMachine($machine) |
{ |
679,7 → 686,7 |
* |
* @see System::$_uptime |
* |
* @return Integer |
* @return int |
*/ |
public function getUptime() |
{ |
693,7 → 700,7 |
* |
* @see System::$_uptime |
* |
* @return Void |
* @return void |
*/ |
public function setUptime($uptime) |
{ |
705,7 → 712,7 |
* |
* @see System::$_users |
* |
* @return Integer |
* @return int |
*/ |
public function getUsers() |
{ |
715,11 → 722,11 |
/** |
* Sets $_users. |
* |
* @param Integer $users user count |
* @param int $users user count |
* |
* @see System::$_users |
* |
* @return Void |
* @return void |
*/ |
public function setUsers($users) |
{ |
746,7 → 753,7 |
* @see System::$_cpus |
* @see CpuDevice |
* |
* @return Void |
* @return void |
*/ |
public function setCpus($cpus) |
{ |
777,7 → 784,7 |
* @see System::$_netDevices |
* @see NetDevice |
* |
* @return Void |
* @return void |
*/ |
public function setNetDevices($netDevices) |
{ |
804,7 → 811,7 |
* @see System::$_pciDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setPciDevices($pciDevices) |
{ |
831,7 → 838,7 |
* @see System::$_ideDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setIdeDevices($ideDevices) |
{ |
858,7 → 865,7 |
* @see System::$_scsiDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setScsiDevices($scsiDevices) |
{ |
885,7 → 892,7 |
* @see System::$_usbDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setUsbDevices($usbDevices) |
{ |
912,7 → 919,7 |
* @see System::$_tbDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setTbDevices($tbDevices) |
{ |
939,7 → 946,7 |
* @see System::$_i2cDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setI2cDevices($i2cDevices) |
{ |
966,7 → 973,7 |
* @see System::$_nvmeDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setNvmeDevices($nvmeDevices) |
{ |
993,7 → 1000,7 |
* @see System::$_memDevices |
* @see HWDevice |
* |
* @return Void |
* @return void |
*/ |
public function setMemDevices($memDevices) |
{ |
1032,7 → 1039,7 |
* |
* @see System::$_memApplication |
* |
* @return Integer |
* @return int |
*/ |
public function getMemApplication() |
{ |
1042,11 → 1049,11 |
/** |
* Sets $_memApplication. |
* |
* @param Integer $memApplication application memory |
* @param int $memApplication application memory |
* |
* @see System::$_memApplication |
* |
* @return Void |
* @return void |
*/ |
public function setMemApplication($memApplication) |
{ |
1058,7 → 1065,7 |
* |
* @see System::$_memBuffer |
* |
* @return Integer |
* @return int |
*/ |
public function getMemBuffer() |
{ |
1068,11 → 1075,11 |
/** |
* Sets $_memBuffer. |
* |
* @param Integer $memBuffer buffer memory |
* @param int $memBuffer buffer memory |
* |
* @see System::$_memBuffer |
* |
* @return Void |
* @return void |
*/ |
public function setMemBuffer($memBuffer) |
{ |
1084,7 → 1091,7 |
* |
* @see System::$_memCache |
* |
* @return Integer |
* @return int |
*/ |
public function getMemCache() |
{ |
1094,11 → 1101,11 |
/** |
* Sets $_memCache. |
* |
* @param Integer $memCache cache memory |
* @param int $memCache cache memory |
* |
* @see System::$_memCache |
* |
* @return Void |
* @return void |
*/ |
public function setMemCache($memCache) |
{ |
1110,7 → 1117,7 |
* |
* @see System::$_memFree |
* |
* @return Integer |
* @return int |
*/ |
public function getMemFree() |
{ |
1120,11 → 1127,11 |
/** |
* Sets $_memFree. |
* |
* @param Integer $memFree free memory |
* @param int $memFree free memory |
* |
* @see System::$_memFree |
* |
* @return Void |
* @return void |
*/ |
public function setMemFree($memFree) |
{ |
1136,7 → 1143,7 |
* |
* @see System::$_memTotal |
* |
* @return Integer |
* @return int |
*/ |
public function getMemTotal() |
{ |
1146,11 → 1153,11 |
/** |
* Sets $_memTotal. |
* |
* @param Integer $memTotal total memory |
* @param int $memTotal total memory |
* |
* @see System::$_memTotal |
* |
* @return Void |
* @return void |
*/ |
public function setMemTotal($memTotal) |
{ |
1162,7 → 1169,7 |
* |
* @see System::$_memUsed |
* |
* @return Integer |
* @return int |
*/ |
public function getMemUsed() |
{ |
1172,11 → 1179,11 |
/** |
* Sets $_memUsed. |
* |
* @param Integer $memUsed used memory |
* @param int $memUsed used memory |
* |
* @see System::$_memUsed |
* |
* @return Void |
* @return void |
*/ |
public function setMemUsed($memUsed) |
{ |
1203,7 → 1210,7 |
* @see System::$_swapDevices |
* @see DiskDevice |
* |
* @return Void |
* @return void |
*/ |
public function setSwapDevices($swapDevices) |
{ |
1229,7 → 1236,7 |
* |
* @see System::$_processes |
* |
* @return Void |
* @return void |
*/ |
public function setProcesses($processes) |
{ |
1240,4 → 1247,38 |
} |
*/ |
} |
|
/** |
* Returns $_virtualizer. |
* |
* @see System::$_virtualizer |
* |
* @return array |
*/ |
public function getVirtualizer() |
{ |
return $this->_virtualizer; |
} |
|
/** |
* Sets $_virtualizer. |
* |
* @param String $virtualizer virtualizername |
* @param Bool|String $value true, false or virtualizername to replace |
* |
* @see System::$_virtualizer |
* |
* @return void |
*/ |
public function setVirtualizer($virtualizer, $value = true) |
{ |
if (!isset($this->_virtualizer[$virtualizer])) { |
if (is_bool($value)) { |
$this->_virtualizer[$virtualizer] = $value; |
} else { // replace the virtualizer with another |
$this->_virtualizer[$virtualizer] = true; |
$this->_virtualizer[$value] = false; |
} |
} |
} |
} |