-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added condition for ryzen to CPU temperature. #81
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay!
val=$(echo "$val" | sed -e 's/^Tccd/Core /') | ||
if [[ $val =~ Core ]]; then | ||
echo "$val" | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}' | ||
elif [[ $val =~ Tctl ]]; then | ||
echo "$val" | sed -n 's/Tctl:\s*+//p' | tr -d " " | ||
elif [[ $val =~ Tdie ]]; then | ||
echo "$val" | sed -n 's/Tdie:\s*+//p' | tr -d " " | ||
else | ||
echo "NA" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this?
val=$(echo "$val" | sed -e 's/^Tccd/Core /') | |
if [[ $val =~ Core ]]; then | |
echo "$val" | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}' | |
elif [[ $val =~ Tctl ]]; then | |
echo "$val" | sed -n 's/Tctl:\s*+//p' | tr -d " " | |
elif [[ $val =~ Tdie ]]; then | |
echo "$val" | sed -n 's/Tdie:\s*+//p' | tr -d " " | |
else | |
echo "NA" | |
fi | |
echo "$val" | sed -r -e 's/^(Tccd|Tctl:|Tdie:)/Core /' | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core\s+[0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working for my CPU (AMD Ryzen 9 3950X). The original proposal somehow works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Can you post the output of sensors
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm a little bit busy lately. Here's my sensors
output:
➜ sensors
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: N/A
k10temp-pci-00c3
Adapter: PCI adapter
Tdie: +57.8°C (high = +70.0°C)
Tctl: +57.8°C
closes #78