Project

General

Profile

Feature #14255 » pch_data.diff

Steve Wheeler, 04/09/2023 01:31 PM

View differences:

src/etc/inc/rrd.inc
401 401
			}
402 402

  
403 403
			/* QUEUES, set up the queues databases */
404
			if (($altq_list_queues[$ifname]) && 
404
			if (($altq_list_queues[$ifname]) &&
405 405
			    !empty($altq_list_queues[$ifname]->get_queue_list())) {
406 406
				$altq =& $altq_list_queues[$ifname];
407 407
				/* NOTE: Is it worth as its own function?! */
......
744 744
		$unknown = "";
745 745
		$rrdupdateds = "";
746 746
		$rrdsensors = "";
747
		$_gb = exec("/sbin/sysctl -q hw.acpi.thermal dev.cpu dev.t5nex dev.armada_thermal dev.cordbuc | /usr/bin/grep temperature | /usr/bin/cut -d':' -f1", $sensors_array);
747
		$_gb = exec("/sbin/sysctl -q hw.acpi.thermal dev.cpu dev.t5nex dev.armada_thermal dev.cordbuc dev.pchtherm | /usr/bin/grep temperature | /usr/bin/cut -d':' -f1", $sensors_array);
748 748

  
749 749
		if (!empty($sensors_array)) {
750 750
			foreach ($sensors_array as $sensor) {
src/usr/local/www/widgets/javascript/thermal_sensors.js
149 149
function getSensorFriendlyName(sensorFullName) {
150 150
	var rzone = /^hw\.acpi\.thermal\.tz([0-9]+)\.temperature$/;
151 151
	var rcore = /^dev\.cpu\.([0-9]+)\.temperature$/;
152
	var rpch = /^dev\.pchtherm\.([0-9]+)\.temperature$/;
152 153

  
153 154
	if (rzone.test(sensorFullName)) {
154 155
		return "Zone " + rzone.exec(sensorFullName)[1];
......
158 159
		return "Core " + rcore.exec(sensorFullName)[1];
159 160
	}
160 161

  
162
	if (rpch.test(sensorFullName)) {
163
		return "PCH " + rpch.exec(sensorFullName)[1];
164
	}
165

  
161 166
	return sensorFullName;
162 167
}
163 168

  
src/usr/local/www/widgets/widgets/thermal_sensors.widget.php
33 33
	if ($specplatform['name'] == '5100') {
34 34
		$_gb = exec("/sbin/sysctl -q dev.cpu | /usr/bin/grep temperature | /usr/bin/sort", $dfout);
35 35
	} else {
36
		$_gb = exec("/sbin/sysctl -q hw.acpi.thermal dev.cpu dev.t5nex dev.armada_thermal dev.cordbuc | /usr/bin/grep 'temperature:'", $dfout);
36
		$_gb = exec("/sbin/sysctl -q hw.acpi.thermal dev.cpu dev.t5nex dev.armada_thermal dev.cordbuc dev.pchtherm | /usr/bin/grep 'temperature:'", $dfout);
37 37
	}
38 38
	$dfout_filtered = array_filter($dfout, function($v) {
39 39
		return strpos($v, ' -') === false;
(1-1/2)