LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2010, 05:50 AM   #1
anu_123
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Rep: Reputation: 0
Question how to read CPU temperature and fan speed using c++


I want to read the temperature of my cpu and fan speed using a c++ program and then plot it..

How can i do it?

thanks
 
Old 05-08-2010, 05:58 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
For the reading part, it might be worth looking at lmsensors source code http://dl.lm-sensors.org/lm-sensors/snapshots/

Unless you particularly want to write it yourself lmsensors and something like GKrellM will do it.
 
Old 05-08-2010, 06:04 AM   #3
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
or
Code:
man proc
cat /proc/acpi/fan/fan0
cat /proc/acpi/thermalzone/zone1/foo
depending on what this is for might also work ?

Last edited by djsmiley2k; 05-08-2010 at 06:06 AM.
 
Old 05-09-2010, 11:26 PM   #4
anu_123
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Original Poster
Rep: Reputation: 0
the directories /proc/acpi/fan/ and /proc/acpi/thermalzone/ are empty they do not have fan0 and zone1/foo in it...

Last edited by anu_123; 05-09-2010 at 11:29 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing whether my fan and CPU temperature monitoring program is ok powah Linux - Hardware 2 05-09-2010 11:06 PM
ACPI can't detect temperature and fan speed madonion87 Linux - Laptop and Netbook 1 11-21-2007 09:13 PM
How can I read CPU temperature ankit4u1 Programming 3 05-30-2007 01:48 AM
Controlling fan speed according to temperature in Kubuntu 7.04 pashabear Linux - Laptop and Netbook 3 05-09-2007 01:00 PM
howto: control CPU fan speed and Northbridge fan speed? hedpe Linux - Software 2 04-18-2005 02:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration