| | |
Getting CPU load, temperature, etc
![]() |
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
--Martin Golding
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
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
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
on linux you would just grep sysctl for a block of info
or query for the specific variable
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.
.
$ 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.
•
•
Join Date: Apr 2008
Posts: 118
Reputation:
Solved Threads: 12
Yes, there are always Win32 apis for eveything
See on Win32 api group
See on Win32 api group
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.
.
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.
•
•
Join Date: Apr 2008
Posts: 118
Reputation:
Solved Threads: 12
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 ?
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.
•
•
Join Date: Apr 2009
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
do ya get the feeling that your posts are worthless? apparently, everyone else does.
.
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) !
![]() |
Similar Threads
- P4 CPU Temperature (Motherboards, CPUs and RAM)
- No Display (Motherboards, CPUs and RAM)
- Dell Inspiron 8600 running very hot (Cases, Fans and Power Supplies)
- > Dell Temperature Reading? (Cases, Fans and Power Supplies)
- Need Serious help, constant crash with high CPU usage programs (Viruses, Spyware and other Nasties)
- Extremely slow performance and freeze-ups (Storage)
- Error Loading and Installing Windows (Troubleshooting Dead Machines)
- Overclocking Question (Motherboards, CPUs and RAM)
- CPU fan vibration (Cases, Fans and Power Supplies)
Other Threads in the C Forum
- Previous Thread: What is execv equivalent api
- Next Thread: SetWindowText giving error "invalid conversion from `int' to `HWND__*"
| Thread Tools | Search this Thread |
#include * ansi api array arrays asterisks binarysearch calculate centimeter changingto char character convert copyanyfile copyimagefile copypdffile creafecopyofanytypeoffileinc createcopyoffile createprocess() database dynamic execv fflush fgets file floatingpointvalidation fork forloop frequency function getlogicaldrivestrin givemetehcodez grade graphics gtkwinlinux histogram homework i/o inches include infiniteloop input interest intmain() iso keyboard km license linked linkedlist linux list looping loopinsideloop. lowest matrix microsoft mysql oddnumber open opendocumentformat openwebfoundation pdf pointer posix power program programming pyramidusingturboccodes radix read recursion recv recvblocked reversing scanf scheduling segmentationfault send sequential shape single socket socketprogramming stack standard strchr string suggestions test threads turboc unix urboc user variable whythiscodecausesegmentationfault win32api windowsapi






