LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 05-24-2007, 04:42 PM   #1
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Rep: Reputation: 15
How can I read CPU temperature


Hi,

I want to display few metrics of my CPU like CPU occupancy, CPU temperature, CPU throughput and power consumption !

How can i do that in C/C++?

I tried to google, but in vain !! any help would be appreciated ! thanks in advance

ankit
 
Old 05-24-2007, 05:06 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
You could look at the code that interfaces with libsensors/lm-sensors for either gkrellm or ksensors if you are looking for something to monitor them instead of writing your own then installing lm-sensors running the sensors-detect script and using either of the mentioned programs will do it. This of course assumes that you sensor chip(s) on the motherboard is/are supported by lm-sensors the have their own mail list that you could post to at lm-sensors.org.
 
Old 05-25-2007, 03:27 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
it's in /proc somewhere

also see man acpi
 
Old 05-30-2007, 01:48 AM   #4
gizmo_thunder
Member
 
Registered: Apr 2004
Posts: 101

Rep: Reputation: 15
man proc

provides information about what /proc filesystem contains.
Go through it you might find it useful.
 
  


Reply

Tags
c++, cpu, temperature



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
CPU temperature Sc0pE Linux - Software 2 05-22-2005 05:10 PM
CPU temperature too high Mr_Zet Linux - Laptop and Netbook 9 11-17-2004 10:55 AM
cpu temperature alaios Linux - Hardware 4 09-21-2004 04:30 PM
how to get cpu temperature taoweijia Linux - Software 3 02-13-2004 06:04 PM
CPU Temperature Cubiq Programming 3 04-06-2002 11:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:52 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