/web/acc/phpsysinfo/includes/to/class.System.inc.php |
---|
177,6 → 177,15 |
private $_nvmeDevices = array(); |
/** |
* array with Mem devices |
* |
* @see HWDevice |
* |
* @var array |
*/ |
private $_memDevices = array(); |
/** |
* array with disk devices |
* |
* @see DiskDevice |
965,6 → 974,33 |
} |
/** |
* Returns $_memDevices. |
* |
* @see System::$_memDevices |
* |
* @return array |
*/ |
public function getMemDevices() |
{ |
return $this->_memDevices; |
} |
/** |
* Sets $_memDevices. |
* |
* @param HWDevice $memDevices mem device |
* |
* @see System::$_memDevices |
* @see HWDevice |
* |
* @return Void |
*/ |
public function setMemDevices($memDevices) |
{ |
array_push($this->_memDevices, $memDevices); |
} |
/** |
* Returns $_diskDevices. |
* |
* @see System::$_diskDevices |
/web/acc/phpsysinfo/includes/to/device/class.DiskDevice.inc.php |
---|
77,7 → 77,7 |
/** |
* inodes usage in percent if available |
* |
* @var |
* @var Integer |
*/ |
private $_percentInodesUsed = null; |
84,7 → 84,7 |
/** |
* ignore mode |
* |
* @var Ignore |
* @var Integer |
*/ |
private $_ignore = 0; |
99,7 → 99,7 |
public function getPercentUsed() |
{ |
if ($this->_total > 0) { |
return round($this->_used / $this->_total * 100); |
return 100 - min(floor($this->_free / $this->_total * 100), 100); |
} else { |
return 0; |
} |
/web/acc/phpsysinfo/includes/to/device/class.HWDevice.inc.php |
---|
56,11 → 56,25 |
/** |
* serial number of the device, if not available it will be null |
* |
* @var Integer |
* @var String |
*/ |
private $_serial = null; |
/** |
* speed of the device, if not available it will be null |
* |
* @var Float |
*/ |
private $_speed = null; |
/** |
* voltage of the device, if not available it will be null |
* |
* @var Float |
*/ |
private $_voltage = null; |
/** |
* count of the device |
* |
* @var Integer |
80,7 → 94,8 |
&& $dev->getCapacity() === $this->_capacity |
&& $dev->getManufacturer() === $this->_manufacturer |
&& $dev->getProduct() === $this->_product |
&& $dev->getSerial() === $this->_serial) { |
&& $dev->getSerial() === $this->_serial |
&& $dev->getSpeed() === $this->_speed) { |
return true; |
} else { |
return false; |
192,6 → 207,58 |
} |
/** |
* Returns $_speed. |
* |
* @see HWDevice::$_speed |
* |
* @return Float |
*/ |
public function getSpeed() |
{ |
return $this->_speed; |
} |
/** |
* Sets $_speed. |
* |
* @param Float $speed speed |
* |
* @see HWDevice::$_speed |
* |
* @return Void |
*/ |
public function setSpeed($speed) |
{ |
$this->_speed = $speed; |
} |
/** |
* Returns $_voltage. |
* |
* @see HWDevice::$_voltage |
* |
* @return Float |
*/ |
public function getVoltage() |
{ |
return $this->_voltage; |
} |
/** |
* Sets $_voltage. |
* |
* @param Float $voltage voltage |
* |
* @see HWDevice::$_voltage |
* |
* @return Void |
*/ |
public function setVoltage($voltage) |
{ |
$this->_voltage = $voltage; |
} |
/** |
* Returns $_capacity. |
* |
* @see HWDevice::$_capacity |
/web/acc/phpsysinfo/includes/to/device/class.SensorDevice.inc.php |
---|
61,6 → 61,13 |
private $_event = ""; |
/** |
* unit of values of the sensor |
* |
* @var String |
*/ |
private $_unit = ""; |
/** |
* Returns $_max. |
* |
* @see Sensor::$_max |
189,4 → 196,30 |
{ |
$this->_event = $event; |
} |
/** |
* Returns $_unit. |
* |
* @see Sensor::$_unit |
* |
* @return String |
*/ |
public function getUnit() |
{ |
return $this->_unit; |
} |
/** |
* Sets $_unit. |
* |
* @param String $unit sensor unit |
* |
* @see Sensor::$_unit |
* |
* @return Void |
*/ |
public function setUnit($unit) |
{ |
$this->_unit = $unit; |
} |
} |