Getting CPU load, temperature, etc

Reply

Join Date: Dec 2007
Posts: 236
Reputation: TheBeast32 is on a distinguished road 
Solved Threads: 6
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Posting Whiz in Training

Getting CPU load, temperature, etc

 
0
  #1
Apr 19th, 2009
Hi, how would I get the temperature and percentage of load for my CPU, GPU, and other things like the hard drive? I'm on Windows XP. Is there something in the Win32 API or what?
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: Getting CPU load, temperature, etc

 
0
  #2
Apr 19th, 2009
A search through the WinAPI turned nothing like what you want. My guess is that those are things only XP knows and keeps them secret. I could be quite wrong though.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 951
Reputation: MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice 
Solved Threads: 92
MosaicFuneral's Avatar
MosaicFuneral MosaicFuneral is offline Offline
Posting Shark

Re: Getting CPU load, temperature, etc

 
0
  #3
Apr 19th, 2009
I don't think there's a standard way of doing it.
There was something in the Intel manual: http://download.intel.com/design/pro...als/253668.pdf
And here's a project you might want to look at: http://www.lm-sensors.org/browser
"Jedenfalls bin ich überzeugt, daß der Alte nicht würfelt."
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 1,604
Reputation: jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of 
Solved Threads: 120
jephthah's Avatar
jephthah jephthah is offline Offline
Posting Virtuoso

Re: Getting CPU load, temperature, etc

 
0
  #4
Apr 20th, 2009
on linux you would just grep sysctl for a block of info
$ sysctl -a |grep therm
...

or query for the specific variable
$  sysctl hw.acpi.thermal.tz0.temperature
hw.acpi.thermal.tz0.temperature: 54.0C

on windows... i dunno. you can always find some freeware GUI application such as this, but unfortunately has no command line interface that i'm aware of.

f you can find something similar that allows command line interface, you can do a system() command to query it. which still won't help you develop a commercial application, but might do in a pinch for a personal project or internally distributed app.

if you need something more professional, you'll have to roll your own API.


.
Last edited by jephthah; Apr 20th, 2009 at 12:12 pm.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 118
Reputation: marco93 is infamous around these parts marco93 is infamous around these parts marco93 is infamous around these parts 
Solved Threads: 12
marco93 marco93 is offline Offline
Junior Poster

Re: Getting CPU load, temperature, etc

 
-3
  #5
Apr 20th, 2009
Yes, there are always Win32 apis for eveything
See on Win32 api group
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 1,604
Reputation: jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of 
Solved Threads: 120
jephthah's Avatar
jephthah jephthah is offline Offline
Posting Virtuoso

Re: Getting CPU load, temperature, etc

 
0
  #6
Apr 20th, 2009
then perhaps you can enlighten us by pointing to one, rather than a generic newsgroup link? and thanks for hiding a link that crapped all over my Outlook Express, by the way.



EDIT: oh i see that's your favorite all time link. do ya get the feeling that your posts are worthless? apparently, everyone else does.

.
Last edited by jephthah; Apr 20th, 2009 at 4:35 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 951
Reputation: MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice 
Solved Threads: 92
MosaicFuneral's Avatar
MosaicFuneral MosaicFuneral is offline Offline
Posting Shark

Re: Getting CPU load, temperature, etc

 
1
  #7
Apr 20th, 2009
marco93 is just a bot that's managed to strangely survive for so long.
"Jedenfalls bin ich überzeugt, daß der Alte nicht würfelt."
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 118
Reputation: marco93 is infamous around these parts marco93 is infamous around these parts marco93 is infamous around these parts 
Solved Threads: 12
marco93 marco93 is offline Offline
Junior Poster

Re: Getting CPU load, temperature, etc

 
-3
  #8
Apr 22nd, 2009
Everything about Win32 api has been answered for 20 years on Win32 api group
Everything about Excel has been answered for 20 years on Excel group
etc...

Why reposting questions answered hundreds of times on NNTP, before DejaNews ?!
(even on BBS in 1985 for Windows 1.0, with different methods of course !)
Are you just born ?
Last edited by marco93; Apr 22nd, 2009 at 9:38 am.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: mika_ is an unknown quantity at this point 
Solved Threads: 0
mika_ mika_ is offline Offline
Newbie Poster

Re: Getting CPU load, temperature, etc

 
-1
  #9
Apr 22nd, 2009
Originally Posted by jephthah View Post
do ya get the feeling that your posts are worthless? apparently, everyone else does.
.
No, his help is highly valuable.
The Win32 group is fantastic, a goldmine for Windows developers, with incredible undocumented tips (that
you can't even find in Msdn), from the greatest Win32 gurus in the world (MS internal or not) !
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 1,604
Reputation: jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of 
Solved Threads: 120
jephthah's Avatar
jephthah jephthah is offline Offline
Posting Virtuoso

Re: Getting CPU load, temperature, etc

 
1
  #10
Apr 22nd, 2009
well, then maybe one of you Win32 API gurus can post something remotely resembling an answer to the OP's question??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC