From 32ca3ed2e0b1a790003b3a872f8cf7f382774bf2 Mon Sep 17 00:00:00 2001 From: Meliox Date: Tue, 11 Jun 2024 20:59:21 +0200 Subject: [PATCH] f --- pve-mod-gui-sensors.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index 640071d..d93989b 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -96,15 +96,28 @@ function configure { if (echo "$sensorsOutput" | grep -q "$item"); then case "$item" in "coretemp-"*) + # Intel CPU + # Try to find temperature information CPU_ADDRESS_PREFIX=$item CPU_ITEM_PREFIX="Core " CPU_TEMP_CAPTION="Core" break ;; "k10temp-"*) - CPU_ADDRESS_PREFIX=$item - CPU_ITEM_PREFIX="Tccd" - CPU_TEMP_CAPTION="Temp" + # AMD CPU + # Try to find temperature information + if (echo "$sensorsOutput" | grep -A 2 "$item" | grep -q "Tctl"); then + CPU_ADDRESS_PREFIX=$item + CPU_ITEM_PREFIX="Tccd" + CPU_TEMP_CAPTION="Temp" + elif (echo "$sensorsOutput" | grep -A 2 "$item" | grep -q "Tccd"); then + CPU_ADDRESS_PREFIX=$item + CPU_ITEM_PREFIX="Tccd" + CPU_TEMP_CAPTION="Temp" + else + CPU_ITEM_PREFIX="temp" + CPU_TEMP_CAPTION="Temp" + fi break ;; *)