How to get CPU temperature in linux
Are there any libraries which allow me to get cpu temperature by simple library call?
Can i programmatically measure the heat dissipatiotion by the cpu? |
Yes to your first question - have a look at http://www.lm-sensors.org/ (although Debian probably provides packages). I'm not sure about the second question...
|
If your machine uses ACPI...
cat /proc/acpi/thermal_zone/THM0/temperature Cheers, Tink |
Quote:
Linux laptop 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux |
take the cover off and put your finger on it
;) |
Quote:
Keith |
Slight ACPI path change
Quote:
proc/acpi/thermal_zone/THRM/temperature |
Quote:
|
In Ubuntu try...
Code:
acpi -t |
Thx! Also i'll tell U, that on my OpenSusu 11.1 works both:
cat /proc/acpi/thermal_zone/THRM/temperature acpi -t |
Take the Thermometer and check it...
it will work..........
|
Quote:
|
Moving towards /sys
As /proc is being deprecated you can check your system's temp with acpi -t as it's been said or with "cat /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp". Result is given in mēC (The thermometer you might be interested in might not be in that exact path).
|
Quote:
|
Quote:
while this is good advice I just want to point out that this is a resurrected thread that was started in 2007 ... :) |
All times are GMT -5. The time now is 03:22 AM. |