Monitor BIOS Temp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My motherboard has two temperature probes on the motherboard. One to measure
case temp, the other to measure CPU temp. This PC is used as an HTPC, so
adequate cooling is always a concern.

I would like to write a C# app service that monitors the temp and displays
it on screen when the limits are exceeded. First question, is how do I
retrieve these temperature values from the BIOS using C#? Second, how do I
write a transparent warning on top of all other windows that displays a
warning. The PC is mainly used for watching movies and it would be nice if
the on screen display would just pop up during the movie when needed. This
app will also perform a PC shutdown when temps get too high, especially since
the pc is always on.
 
Chris said:
My motherboard has two temperature probes on the motherboard. One to
measure case temp, the other to measure CPU temp. This PC is used as
an HTPC, so adequate cooling is always a concern.

I would like to write a C# app service that monitors the temp and
displays it on screen when the limits are exceeded. First question,
is how do I retrieve these temperature values from the BIOS using C#?
Second, how do I write a transparent warning on top of all other
windows that displays a warning. The PC is mainly used for watching
movies and it would be nice if the on screen display would just pop
up during the movie when needed. This app will also perform a PC
shutdown when temps get too high, especially since the pc is always
on.

Just FYI, not to discourage your programming attempt, you could just use
this:

http://www.pcworld.com/downloads/file_description/0,fid,7309,00.asp

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
 
I have determined that in order to read the temperature from the BIOS I need
to access the Win32_TemperatureProbe class. In this class, exists a
CurrentReading property which is type sint32. This sint32 type contains
Description of type string which contains the temperature value. My
question, is how do I get the value of this description field under the
CurrentReading? My main problem is that I do not know how to cast to sint32
type since it is not defined.


ManagementClass processClass = new
ManagementClass(@"root\cimv2:Win32_TemperatureProbe");
foreach (ManagementObject service in processClass.GetInstances())
{
Console.WriteLine("Service = " +
service.GetPropertyValue("CurrentReading.Description"));
}


Reginald Blue said:
Chris said:
My motherboard has two temperature probes on the motherboard. One to
measure case temp, the other to measure CPU temp. This PC is used as
an HTPC, so adequate cooling is always a concern.

I would like to write a C# app service that monitors the temp and
displays it on screen when the limits are exceeded. First question,
is how do I retrieve these temperature values from the BIOS using C#?
Second, how do I write a transparent warning on top of all other
windows that displays a warning. The PC is mainly used for watching
movies and it would be nice if the on screen display would just pop
up during the movie when needed. This app will also perform a PC
shutdown when temps get too high, especially since the pc is always
on.

Just FYI, not to discourage your programming attempt, you could just use
this:

http://www.pcworld.com/downloads/file_description/0,fid,7309,00.asp

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
 
SInt32 is "signed int" or simply an int.

Willy.

Chris Fink said:
I have determined that in order to read the temperature from the BIOS I
need
to access the Win32_TemperatureProbe class. In this class, exists a
CurrentReading property which is type sint32. This sint32 type contains
Description of type string which contains the temperature value. My
question, is how do I get the value of this description field under the
CurrentReading? My main problem is that I do not know how to cast to
sint32
type since it is not defined.


ManagementClass processClass = new
ManagementClass(@"root\cimv2:Win32_TemperatureProbe");
foreach (ManagementObject service in processClass.GetInstances())
{
Console.WriteLine("Service = " +
service.GetPropertyValue("CurrentReading.Description"));
}


Reginald Blue said:
Chris said:
My motherboard has two temperature probes on the motherboard. One to
measure case temp, the other to measure CPU temp. This PC is used as
an HTPC, so adequate cooling is always a concern.

I would like to write a C# app service that monitors the temp and
displays it on screen when the limits are exceeded. First question,
is how do I retrieve these temperature values from the BIOS using C#?
Second, how do I write a transparent warning on top of all other
windows that displays a warning. The PC is mainly used for watching
movies and it would be nice if the on screen display would just pop
up during the movie when needed. This app will also perform a PC
shutdown when temps get too high, especially since the pc is always
on.

Just FYI, not to discourage your programming attempt, you could just use
this:

http://www.pcworld.com/downloads/file_description/0,fid,7309,00.asp

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
 
sInt32 is a signed 32 bit integer see the following:

http://msdn.microsoft.com/library/d...ml/frlrfsystemmanagementcimtypeclasstopic.asp

therefore you can convert it to System.Int32 using System.Convert.ToInt32

HTH

Ollie Riches

Chris Fink said:
I have determined that in order to read the temperature from the BIOS I
need
to access the Win32_TemperatureProbe class. In this class, exists a
CurrentReading property which is type sint32. This sint32 type contains
Description of type string which contains the temperature value. My
question, is how do I get the value of this description field under the
CurrentReading? My main problem is that I do not know how to cast to
sint32
type since it is not defined.


ManagementClass processClass = new
ManagementClass(@"root\cimv2:Win32_TemperatureProbe");
foreach (ManagementObject service in processClass.GetInstances())
{
Console.WriteLine("Service = " +
service.GetPropertyValue("CurrentReading.Description"));
}


Reginald Blue said:
Chris said:
My motherboard has two temperature probes on the motherboard. One to
measure case temp, the other to measure CPU temp. This PC is used as
an HTPC, so adequate cooling is always a concern.

I would like to write a C# app service that monitors the temp and
displays it on screen when the limits are exceeded. First question,
is how do I retrieve these temperature values from the BIOS using C#?
Second, how do I write a transparent warning on top of all other
windows that displays a warning. The PC is mainly used for watching
movies and it would be nice if the on screen display would just pop
up during the movie when needed. This app will also perform a PC
shutdown when temps get too high, especially since the pc is always
on.

Just FYI, not to discourage your programming attempt, you could just use
this:

http://www.pcworld.com/downloads/file_description/0,fid,7309,00.asp

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
 
Back
Top