23,11 → 23,18 |
*/ |
public function build() |
{ |
if (PSI_OS == 'Linux') { |
if ((PSI_OS == 'Linux') && !defined('PSI_EMU_HOSTNAME')) { |
$hwpaths = glob("/sys/devices/platform/thinkpad_hwmon/", GLOB_NOSORT); |
if (is_array($hwpaths) && (count($hwpaths) == 1)) { |
$this->_temperature($hwpaths[0]); |
$this->_fans($hwpaths[0]); |
$hwpaths2 = glob("/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon*/", GLOB_NOSORT); |
if (is_array($hwpaths2) && (count($hwpaths2) > 0)) { |
$hwpaths = array_merge($hwpaths, $hwpaths2); |
} |
$totalh = count($hwpaths); |
for ($h = 0; $h < $totalh; $h++) { |
$this->_temperature($hwpaths[$h]); |
$this->_fans($hwpaths[$h]); |
} |
} |
} |
} |