Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 10-06-2015, 11:47 AM   #1
Solid State Member
Join Date: Jun 2012
Location: --------------
Posts: 19
Default code for CPU heat detection

ok what hardware/OS software monitoring processor's heat
what is the C++ code for access the CPU heat monitoring

faslan is offline   Reply With Quote
Old 10-07-2015, 12:57 PM   #2
Wizard of Wires
setishock's Avatar
Join Date: Feb 2005
Location: Not sure
Posts: 10,030
Default Re: code for CPU heat detection

Take something open source apart and see what they used. Reverse engineering laws do not apply to open source software.

setishock is offline   Reply With Quote
Old 10-16-2015, 07:12 AM   #3
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 8,107
Default Re: code for CPU heat detection

first, there isn't a standard way of doing this, there is no C++ temperature class, or function that just pulls the info from nowhere.

second, of the available methods they are of course different in Windows and Linux.

Third, it, the data is provided as a function of the hardware available and the bios. if there is no temperature probe, or the temperature info isn't ever interpreted by the machine, (like it's just a simple switch) then you'll have no data to collect.

fourth, even if the data is available, it doesn't have to be presented in a standard way, and different hardware manufacturers may present data in different ways...

if you're using linux then you can grep /proc/acpi/thermal_zone/THRM/temperature for the information., and write a program to open that file and read the relevant bytes.

if you're using windows then use the WMI class Win32_TemperatureProbe

if that doesn't work you may try
using WMI and query MSAcpi_ThermalZoneTemperature looking for the value of "CurrentTemperature"
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 02:46 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0