This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SCRIPT] Check CPU & GPU Temperatures
#1
I created a simple bash script that will print out in terminal the temperatures of thermal zone 1 & 2 (0 & 1 on tinkeros 2.0+) (I'm guessing it's CPU & GPU) in celsius and faranheit. Just save this into a .sh file and run with ./name.sh

You might need to do this before you can run it
sudo chmod +x name.sh

For Tinker 1.9-
Code:
#!/bin/bash
celsius1=$(cat /sys/class/thermal/thermal_zone1/temp | sed 's/.\{3\}$/.&/')
celsius2=$(cat /sys/class/thermal/thermal_zone2/temp | sed 's/.\{3\}$/.&/')
faranheit1=$(echo "scale=2;((9/5) * $celsius1) + 32" |bc)
faranheit2=$(echo "scale=2;((9/5) * $celsius2) + 32" |bc)
echo "--------------------"
echo "   Thermal Zone 1"
echo "   ${celsius1} °C"
echo "   ${faranheit1} °F"
echo "--------------------"
echo "   Thermal Zone 2"
echo "   ${celsius2} °C"
echo "   ${faranheit2} °F"
echo "--------------------"

For Tinker 2.0+ (thanks to planb)
Code:
#!/bin/bash
celsius1=$(cat /sys/class/thermal/thermal_zone0/temp | sed 's/.\{3\}$/.&/')
celsius2=$(cat /sys/class/thermal/thermal_zone1/temp | sed 's/.\{3\}$/.&/')
faranheit1=$(echo "scale=2;((9/5) * $celsius1) + 32" |bc)
faranheit2=$(echo "scale=2;((9/5) * $celsius2) + 32" |bc)
echo "--------------------"
echo "   Thermal Zone 0"
echo "   ${celsius1} °C"
echo "   ${faranheit1} °F"
echo "--------------------"
echo "   Thermal Zone 1"
echo "   ${celsius2} °C"
echo "   ${faranheit2} °F"
echo "--------------------"


I saved mine as temp (no extension) and put it in /usr/bin/ so in terminal I can type temp and it will show me current temperature

Example


Code:
linaro@linaro-alip:~$ temp
--------------------
   Thermal Zone 0
   37.272 °C
   99.089 °F
--------------------
   Thermal Zone 1
   35.909 °C
   96.636 °F
--------------------
Reply
#2
LOL, just what I was looking for at the time I was looking for it Smile
Thanks knuxyl
Linux Noob but learning fast.
I have a small blog with some Raspberry Pi and Tinker Board tutorials I've picked up.
https://the-bionic-cyclist.co.uk
Reply
#3
Thank you very much! that;s what i want!
Reply
#4
Thanks, usefull!

Smile
Reply
#5
It is nice to get temperatures, but what are the thresholds of CPU/GPU?
Reply
#6
Hi

I am not sure what your threshold mean.
Here are some thermal rules for your reference.
We will lower the CPU frequency when the temperature reach at 70°C and 80°C.
And shut down the board at 90°C
Hope this information could help you.

Thanks.
Reply
#7
Yes, this is what I was looking for. Thanks.

However, 70°C are reached fast without active cooling....
Reply
#8
(08-25-2017, 08:18 AM)wappi Wrote: Yes, this is what I was looking for. Thanks.

However, 70°C are reached fast without active cooling....

Watching HD video on youtube with Chromium after a long time gives me 46-49°C. What are you doing to get those temperatures? Did you put on the heatsink?
Reply
#9
(08-27-2017, 08:46 PM)knuxyl Wrote:
(08-25-2017, 08:18 AM)wappi Wrote: Yes, this is what I was looking for. Thanks.

However, 70°C are reached fast without active cooling....

Watching HD video on youtube with Chromium after a long time gives me 46-49°C. What are you doing to get those temperatures? Did you put on the heatsink?

When watching youtube, it can easily raise the temperature to ~78°C with official heatsink. I put my tinker board in an aluminum case and I extended the heatsink bigger and make it touch the case. In this case, the temperature can still get ~60°C. How can you maintain that low temperature? a fan? Room temperature may affect. It's end of summer here but hot.
Reply
#10
I use also official heat sink. With Android I have reached 70°C to 80°C (CPU) by reading news, installing apps or playing some games. With a small fan above the CPU I could lower temperature by ~20°C.
https://tinkerboarding.co.uk/forum/thread-573-post-2149.html#pid2149

It seems that many users reach fast higher temperatures of 70°C and more... just guess that knuxyl is watching videos by using hardware decoding - this does not stress the CPU.
Unfortunately, to use board's CPU performance it seems necessary to have active cooling...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)