diff --git a/src/node_info/files/Collector/LmSensors.pm b/src/node_info/files/Collector/LmSensors.pm index 9fc952d..8acd393 100644 --- a/src/node_info/files/Collector/LmSensors.pm +++ b/src/node_info/files/Collector/LmSensors.pm @@ -96,6 +96,7 @@ sub _get_temperature_sensors { nvme => $config{lm_sensors}{enable_nvme_temp} ? \1 : \0, fans => $config{lm_sensors}{enable_fan_speed} ? \1 : \0, hdd => $config{lm_sensors}{enable_hdd_temp} ? \1 : \0, + other => $config{lm_sensors}{enable_other_temp} ? \1 : \0, data => { 'PVE MOD lm-sensors Enhanced' => $sensors_json }, }); diff --git a/src/node_info/files/Config.pm b/src/node_info/files/Config.pm index 2ccadc2..5d31db2 100644 --- a/src/node_info/files/Config.pm +++ b/src/node_info/files/Config.pm @@ -69,6 +69,7 @@ our %config = ( enable_ram_temp => 0, enable_hdd_temp => 0, enable_nvme_temp => 0, + enable_other_temp => 0, enable_fan_speed => 0, display_zero_speed_fans => 0, temp_unit => 'C', diff --git a/src/node_info/files/PveMod_pvemanagerlib.js b/src/node_info/files/PveMod_pvemanagerlib.js index 8a9f47d..f632d26 100644 --- a/src/node_info/files/PveMod_pvemanagerlib.js +++ b/src/node_info/files/PveMod_pvemanagerlib.js @@ -681,6 +681,9 @@ Ext.define('PVE.node.StatusView', { if (parsed.disabled === true) { this.hide(); return ''; + } else if (parsed.other !== true) { + this.hide(); + return ''; } objValue = (parsed.data && parsed.data[Object.keys(parsed.data)[0]]) || {}; } catch(e) { @@ -755,7 +758,7 @@ Ext.define('PVE.node.StatusView', { return '
' + html + '
'; } }, - + // ========== TERTIARY DIAGNOSTICS (Tier 3) ========== { xtype: 'box', diff --git a/src/node_info/node_info.configure.sh b/src/node_info/node_info.configure.sh index 0df7c99..7c10e0a 100644 --- a/src/node_info/node_info.configure.sh +++ b/src/node_info/node_info.configure.sh @@ -64,7 +64,7 @@ _check_nvidia_tool() { node_info_defaults() { LM_SENSORS_ENABLED=0 ENABLE_CPU=0; CPU_TEMP_TARGET="Core" - ENABLE_RAM_TEMP=0; ENABLE_HDD_TEMP=0; ENABLE_NVME_TEMP=0 + ENABLE_RAM_TEMP=0; ENABLE_HDD_TEMP=0; ENABLE_NVME_TEMP=0; ENABLE_OTHER_TEMP=0 ENABLE_FAN_SPEED=0; DISPLAY_ZERO_SPEED_FANS=0; TEMP_UNIT="C" ENABLE_INTEL_GPU_INFO=0; ENABLE_NVIDIA_GPU_INFO=0; ENABLE_AMD_GPU_INFO=0 ENABLE_GPU_HISTORY=0 @@ -101,6 +101,7 @@ node_info_load_conf() { lm_sensors.enable_ram_temp) ENABLE_RAM_TEMP="$val" ;; lm_sensors.enable_hdd_temp) ENABLE_HDD_TEMP="$val" ;; lm_sensors.enable_nvme_temp) ENABLE_NVME_TEMP="$val" ;; + lm_sensors.enable_other_temp) ENABLE_OTHER_TEMP="$val" ;; lm_sensors.enable_fan_speed) ENABLE_FAN_SPEED="$val" ;; lm_sensors.display_zero_speed_fans) DISPLAY_ZERO_SPEED_FANS="$val" ;; lm_sensors.temp_unit) TEMP_UNIT="$val" ;; @@ -131,7 +132,7 @@ node_info_configure() { # Initialize all variables to off LM_SENSORS_ENABLED=0 ENABLE_CPU=0; CPU_TEMP_TARGET="Core" - ENABLE_RAM_TEMP=0; ENABLE_HDD_TEMP=0; ENABLE_NVME_TEMP=0 + ENABLE_RAM_TEMP=0; ENABLE_HDD_TEMP=0; ENABLE_NVME_TEMP=0; ENABLE_OTHER_TEMP=0 ENABLE_FAN_SPEED=0; DISPLAY_ZERO_SPEED_FANS=0; TEMP_UNIT="C" ENABLE_INTEL_GPU_INFO=0; ENABLE_NVIDIA_GPU_INFO=0; ENABLE_AMD_GPU_INFO=0 ENABLE_GPU_HISTORY=0 @@ -253,8 +254,17 @@ node_info_configure() { #region Other thermals msgb "\n=== Detecting other thermal sensors ===" - local otherCount + local otherTempCount + otherTempCount=$(echo "$sanitisedSensorsOutput" \ + | grep -Ev '"(coretemp|k10temp-pci|cpu_thermal-virtual|nvme|drivetemp-scsi|SODIMM)[^"]*"' \ + | grep -c '"temp[0-9]*_input"' || true) + if [[ "$otherTempCount" -gt 0 ]]; then + info "Detected $otherTempCount other temperature reading(s)." + ENABLE_OTHER_TEMP=1; sensors_detected=true + else + warn "No other (non-CPU/RAM/HDD/NVMe) temperature sensors found." + fi #region Other thermals #region Fans @@ -465,6 +475,7 @@ cpu_temp_target=${CPU_TEMP_TARGET} enable_ram_temp=${ENABLE_RAM_TEMP} enable_hdd_temp=${ENABLE_HDD_TEMP} enable_nvme_temp=${ENABLE_NVME_TEMP} +enable_other_temp=${ENABLE_OTHER_TEMP} enable_fan_speed=${ENABLE_FAN_SPEED} display_zero_speed_fans=${DISPLAY_ZERO_SPEED_FANS} temp_unit=${TEMP_UNIT}