I'm curious about how to display the CPU temperature of my device.

Tonykim

New member
I am using Total Launcher and would like to display the value of the device's CPU temperature in real time at a specific location (see attached image). Please tell me how to set the variable and if there is an example similar to this.
IMG_6687.jpeg
 

Dm114

Well-known member
I am using Total Launcher and would like to display the value of the device's CPU temperature in real time at a specific location (see attached image). Please tell me how to set the variable and if there is an example similar to this.
View attachment 7758
You could display it with Floating Text action but unfortunately this information isn't available with MD.

You could try to make a Feature Request in this forum.
 

Tonykim

New member
You could display it with Floating Text action but unfortunately this information isn't available with MD.

You could try to make a Feature Request in this forum.
Is it possible to set a variable to read CPU temperature? How should I set that variable? (Example: Set Variable > [?])
 

LinerSeven

Active member
An-Nyong, @Tonykim,

It is unknown whether it will work, but the LinuC qualification reference
( https://linuc.org/study/knowledge/452/ )
says that there is a set of files in the Linux standard that monitor the temperature of each core of the CPU, and you can get the temperature by referencing those files with the Cat command.

I have created a sample, could you try it?
 

Attachments

  • _______CPU_Temperature.macro
    7.9 KB · Views: 7

Dm114

Well-known member
An-Nyong, @Tonykim,

It is unknown whether it will work, but the LinuC qualification reference
( https://linuc.org/study/knowledge/452/ )
says that there is a set of files in the Linux standard that monitor the temperature of each core of the CPU, and you can get the temperature by referencing those files with the Cat command.

I have created a sample, could you try it?
Unfortunately I get the following message: "cat: /sys/class/thermal/thermal_zone7/temp: No such file or directory"
 

LinerSeven

Active member
Unfortunately I get the following message: "cat: /sys/class/thermal/thermal_zone7/temp: No such file or directory"
Hi,@Dm114,

I think it's because your mobile phone's CPU probably has 6 cores.
If you set the number of loops to 6, it should work.

Best Regards,
Liner Seven
 

Dm114

Well-known member
Hi,@Dm114,

I think it's because your mobile phone's CPU probably has 6 cores.
If you set the number of loops to 6, it should work.

Best Regards,
Liner Seven
No @LinerSeven, my mobile has 8 cores and, whatever the number of loops the message is the same.

I guess either these files do not exist or are not accessible.
 

LinerSeven

Active member
Hi, @Dm114,

I see, the reference page says that the location of the file changes depending on the environment, so you need to check under /proc/acpi/thermal_zone on your mobile phone.

For Example,

Target File Path
intel /sys/devices/platform/coretemp.0/temp[0-9]_input
i.mx6 /sys/class/thermal/thermal_zone[0-9]/temp
RaspberryPi /sys/class/thermal/thermal_zone[0-9]/temp


The other way to use lm_sensors is suggested in the reference page for the Linux case, but I can't get lm_sensors to work in Termux.

Best Regards,
Liner Seven,
 

Dm114

Well-known member
Hi, @Dm114,

I see, the reference page says that the location of the file changes depending on the environment, so you need to check under /proc/acpi/thermal_zone on your mobile phone.

For Example,

Target File Path
intel /sys/devices/platform/coretemp.0/temp[0-9]_input
i.mx6 /sys/class/thermal/thermal_zone[0-9]/temp
RaspberryPi /sys/class/thermal/thermal_zone[0-9]/temp


The other way to use lm_sensors is suggested in the reference page for the Linux case, but I can't get lm_sensors to work in Termux.

Best Regards,
Liner Seven,
Ok, let me have a look...
 

Dm114

Well-known member
Hi, @Dm114,

I see, the reference page says that the location of the file changes depending on the environment, so you need to check under /proc/acpi/thermal_zone on your mobile phone.

For Example,

Target File Path
intel /sys/devices/platform/coretemp.0/temp[0-9]_input
i.mx6 /sys/class/thermal/thermal_zone[0-9]/temp
RaspberryPi /sys/class/thermal/thermal_zone[0-9]/temp


The other way to use lm_sensors is suggested in the reference page for the Linux case, but I can't get lm_sensors to work in Termux.

Best Regards,
Liner Seven,
Sorry but none of those exist or are accessible on my device... ☹️
 

Endercraft

Moderator (& bug finder :D)
@Dm114 you should use a file explorer to check /sys/class/thermal
It is accessible to me and I can see the thermal_zone folders.
 

Dm114

Well-known member
@Dm114 you should use a file explorer to check /sys/class/thermal
It is accessible to me and I can see the thermal_zone folders.
Thanks for the advice because the one I use cannot access these folders. I'll try with ES explorer but I'm not so fan loading a bunch of apps. So I'm gonna do it for fun, just to see what "hidden" stuff we could find...😃
 

Dimlos

Well-known member
If you have Android 10 or later, you may be able to get data with adb shell dumpsys thermalservice.
The notation is different for each device, so you can use grep to narrow down the list to make it easier to read.
 

Dm114

Well-known member
If you have Android 10 or later, you may be able to get data with adb shell dumpsys thermalservice.
The notation is different for each device, so you can use grep to narrow down the list to make it easier to read.
No, I'm (proudly) stuck to Android 9!😃
 
Top