943,697 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 3966
  • C RSS
Apr 19th, 2009
0

Getting CPU load, temperature, etc

Expand Post »
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?
Similar Threads
Reputation Points: 79
Solved Threads: 6
Posting Whiz in Training
TheBeast32 is offline Offline
236 posts
since Dec 2007
Apr 19th, 2009
0

Re: Getting CPU load, temperature, etc

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.
Reputation Points: 128
Solved Threads: 43
Posting Whiz
death_oclock is offline Offline
389 posts
since Apr 2006
Apr 19th, 2009
0

Re: Getting CPU load, temperature, etc

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
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
MosaicFuneral is offline Offline
1,270 posts
since Nov 2008
Apr 20th, 2009
0

Re: Getting CPU load, temperature, etc

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.
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Apr 20th, 2009
-3

Re: Getting CPU load, temperature, etc

Yes, there are always Win32 apis for eveything
See on Win32 api group
Reputation Points: -76
Solved Threads: 14
Junior Poster
marco93 is offline Offline
132 posts
since Apr 2008
Apr 20th, 2009
0

Re: Getting CPU load, temperature, etc

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.
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008
Apr 20th, 2009
1

Re: Getting CPU load, temperature, etc

marco93 is just a bot that's managed to strangely survive for so long.
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
MosaicFuneral is offline Offline
1,270 posts
since Nov 2008
Apr 22nd, 2009
-3

Re: Getting CPU load, temperature, etc

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.
Reputation Points: -76
Solved Threads: 14
Junior Poster
marco93 is offline Offline
132 posts
since Apr 2008
Apr 22nd, 2009
-1

Re: Getting CPU load, temperature, etc

Click to Expand / Collapse  Quote originally posted by jephthah ...
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) !
Reputation Points: 7
Solved Threads: 0
Newbie Poster
mika_ is offline Offline
6 posts
since Apr 2009
Apr 22nd, 2009
1

Re: Getting CPU load, temperature, etc

well, then maybe one of you Win32 API gurus can post something remotely resembling an answer to the OP's question??
Reputation Points: 2143
Solved Threads: 178
Posting Maven
jephthah is offline Offline
2,567 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: What is execv equivalent api
Next Thread in C Forum Timeline: SetWindowText giving error "invalid conversion from `int' to `HWND__*"





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC