The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: leetow2003 on November 14, 2011, 12:03:33 AM

Title: How to get the temperature of CPU?
Post by: leetow2003 on November 14, 2011, 12:03:33 AM
The fan of CPU sometimes doesn't  run,so
I want to know the temperature of CPU,
My CPU is Intel Pentium Dual core,
How to get the temperature?
and I want to know if I can start the fan?
how to do?
Thank you very much.
Title: Re: How to get the temperature of CPU?
Post by: dedndave on November 14, 2011, 12:25:30 AM
it is not easy to get the fan tempurature with your own code
there are utilities for this though - you might try utilities like Aida32 or maybe even something like CPU-Z

i am guessing the fan is shot - it happened to me
i looked it up on amazon or something - there was a price break at 5 pieces, so i bought 5 of them at $8 ea   :P
i figured, why not - i have 2 machines that are the same
Title: Re: How to get the temperature of CPU?
Post by: leetow2003 on November 14, 2011, 01:18:39 PM
Quote from: dedndave on November 14, 2011, 12:25:30 AM
it is not easy to get the fan tempurature with your own code
there are utilities for this though - you might try utilities like Aida32 or maybe even something like CPU-Z

i am guessing the fan is shot - it happened to me
i looked it up on amazon or something - there was a price break at 5 pieces, so i bought 5 of them at $8 ea   :P
i figured, why not - i have 2 machines that are the same
If are there books about these informations?
Title: Re: How to get the temperature of CPU?
Post by: FORTRANS on November 14, 2011, 01:39:56 PM
Quote from: leetow2003 on November 14, 2011, 01:18:39 PM
If are there books about these informations?

Hi,

   Not really.  This feature tends to depend on the manufacturer
of the chip set used on the motherboard.  Look on their sites
for a technical data sheet for the chip set you have.  Or see
if code for the utilities Dave mentioned is available.  And the
vendor of the motherboard often supply utilities to set up
their motherboards that would show that information.

Regards,

Steve N.
Title: Re: How to get the temperature of CPU?
Post by: ToutEnMasm on November 14, 2011, 02:17:43 PM
seems that the cpuid instruction cn be of good help.
Quote
CPUID Fn8000_0007 Advanced Power Management Information
Register Bits Description
EAX 31:0 Reserved.
EBX 31:0 Reserved.
ECX 31:0 Reserved.
EDX 31:9 Reserved.
EDX 8 TscInvariant. 1 = The TSC rate is ensured to be invariant across all P-States, C-States,
and stop grant transitions (such as STPCLK Throttling); therefore the TSC is suitable for
use as a source of time. 0 = No such guarantee is made and software should avoid attempting
to use the TSC as a source of time.
EDX 7 HwPState. Hardware P-State control. [The P-State Current Limit Register]
MSRC001_0061, [The P-State Control Register] MSRC001_0062, and [The P-State Status
Register] MSRC001_0063 exist.
EDX 6 100MhzSteps: 100 Mhz multiplier control.
EDX 5 STC: software thermal control.
EDX 4 TM: hardware thermal control.
EDX 3 TTP: THERMTRIP.
EDX 2 VID: Voltage ID control.
EDX 1 FID: Frequency ID control.
EDX 0 TS: Temperature sensor.
CPUID Fn8000

sorry,i haven't seen it was 16 bits.



Title: Re: How to get the temperature of CPU?
Post by: FORTRANS on November 14, 2011, 03:23:00 PM
Quote from: ToutEnMasm on November 14, 2011, 02:17:43 PM
seems that the cpuid instruction cn be of good help.

Hi,

   Neat.  Thanks.

Quote
sorry,i haven't seen it was 16 bits.

   Does not matter, still good information.

Regards,

Steve N.
Title: Re: How to get the temperature of CPU?
Post by: dedndave on November 14, 2011, 04:16:30 PM
yah - i don't think that is very useful

it may vary widely across processors
but, as i recall, it requires access to the MSR's/CR's to do anything meaningful
best to just get a utility that supports your specific cpu
Title: Re: How to get the temperature of CPU?
Post by: Farabi on November 28, 2011, 06:21:22 AM
Dont you think FAN is something that should not be handled manually? I wont bought any system that let me toying with my fan.