Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
11-10-2007, 04:28 PM
|
#1
|
|
LQ Newbie
Registered: Apr 2007
Location: Moscow
Distribution: Debian
Posts: 13
Rep:
|
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?
|
|
|
|
11-10-2007, 04:32 PM
|
#2
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,089
Rep: 
|
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...
|
|
|
|
11-10-2007, 07:10 PM
|
#3
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,916
|
If your machine uses ACPI...
cat /proc/acpi/thermal_zone/THM0/temperature
Cheers,
Tink
|
|
|
1 members found this post helpful.
|
11-11-2007, 03:17 PM
|
#4
|
|
LQ Newbie
Registered: Apr 2007
Location: Moscow
Distribution: Debian
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by Tinkster
If your machine uses ACPI...
cat /proc/acpi/thermal_zone/THM0/temperature
Cheers,
Tink
|
i can only move to /proc/acpi/thermal_zone/.
Linux laptop 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux
|
|
|
|
11-12-2007, 03:11 AM
|
#5
|
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,211
Rep: 
|
take the cover off and put your finger on it

|
|
|
|
11-13-2007, 04:28 PM
|
#6
|
|
Member
Registered: Feb 2007
Location: Colorado
Distribution: FC6, FC7 x86_64
Posts: 218
Rep:
|
Quote:
Originally Posted by bigearsbilly
take the cover off and put your finger on it

|
Writting the man page for that would be way too complicated
Keith
|
|
|
|
02-03-2010, 03:04 AM
|
#7
|
|
LQ Newbie
Registered: Jul 2009
Location: Lower S10b0v1a
Distribution: Debian
Posts: 4
Rep:
|
Slight ACPI path change
Quote:
Originally Posted by Tinkster
If your machine uses ACPI...
cat /proc/acpi/thermal_zone/THM0/temperature
Cheers,
Tink
|
On my 2010 Debian Lenny system, the path is:
proc/acpi/thermal_zone/THRM/temperature
|
|
|
|
02-03-2010, 08:46 AM
|
#8
|
|
Member
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 806
Rep: 
|
Quote:
Originally Posted by bigearsbilly
take the cover off and put your finger on it
;)
|
A clear case of the act of measuring affecting the result, unless your finger has a specific heat of 0.
|
|
|
|
02-13-2010, 12:49 PM
|
#9
|
|
LQ Newbie
Registered: Feb 2010
Posts: 1
Rep:
|
In Ubuntu try...
|
|
|
|
05-13-2010, 03:54 AM
|
#10
|
|
LQ Newbie
Registered: May 2010
Location: Odessa, Ukraine
Distribution: openSuSe 11.1
Posts: 1
Rep:
|
Thx! Also i'll tell U, that on my OpenSusu 11.1 works both:
cat /proc/acpi/thermal_zone/THRM/temperature
acpi -t
|
|
|
|
08-09-2010, 02:36 AM
|
#11
|
|
Member
Registered: Jun 2010
Location: India
Distribution: Redhat
Posts: 68
Rep:
|
Take the Thermometer and check it...
it will work..........
|
|
|
1 members found this post helpful.
|
08-09-2010, 07:48 AM
|
#12
|
|
LQ 5k Club
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
|
Quote:
Originally Posted by raviteja_s
it will work..........
|
Is that a joke or spam? Do you realize this thread is a few months old?
|
|
|
|
04-28-2011, 12:51 PM
|
#13
|
|
LQ Newbie
Registered: Mar 2010
Posts: 1
Rep:
|
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).
|
|
|
|
04-28-2011, 01:08 PM
|
#14
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,522
|
Quote:
Originally Posted by tduglas
Linux laptop 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux
|
According to your kernel version you are still using Debian Etch. Etch is not supported anymore (no security updates) since February 2010. I would strongly recommend to upgrade at least to Lenny, better to Squeeze.
|
|
|
|
04-28-2011, 01:39 PM
|
#15
|
|
Senior Member
Registered: Jan 2010
Posts: 1,604
|
Quote:
Originally Posted by TobiSGD
According to your kernel version you are still using Debian Etch. Etch is not supported anymore (no security updates) since February 2010. I would strongly recommend to upgrade at least to Lenny, better to Squeeze.
|
Hi,
while this is good advice I just want to point out that this is a resurrected thread that was started in 2007 ... 
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|