474,047 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitor BIOS Temp

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.
Nov 17 '05 #1
5 11414
Look into using WMI to get the temperature of the CPU. Here is an
article that describes it:

http://msdn.microsoft.com/msdnmag/issues/02/05/WMIMan

Nov 17 '05 #2
Chris Fink wrote:
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/fil...id,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]
Nov 17 '05 #3
I have determined that in order to read the temperature from the BIOS I need
to access the Win32_Temperatu reProbe 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:W in32_Temperatur eProbe");
foreach (ManagementObje ct service in processClass.Ge tInstances())
{
Console.WriteLi ne("Service = " +
service.GetProp ertyValue("Curr entReading.Desc ription"));
}
"Reginald Blue" wrote:
Chris Fink wrote:
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/fil...id,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]

Nov 17 '05 #4
SInt32 is "signed int" or simply an int.

Willy.

"Chris Fink" <Ch*******@disc ussions.microso ft.com> wrote in message
news:56******** *************** ***********@mic rosoft.com...
I have determined that in order to read the temperature from the BIOS I
need
to access the Win32_Temperatu reProbe 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:W in32_Temperatur eProbe");
foreach (ManagementObje ct service in processClass.Ge tInstances())
{
Console.WriteLi ne("Service = " +
service.GetProp ertyValue("Curr entReading.Desc ription"));
}
"Reginald Blue" wrote:
Chris Fink wrote:
> 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/fil...id,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]

Nov 17 '05 #5
sInt32 is a signed 32 bit integer see the following:

http://msdn.microsoft.com/library/de...classtopic.asp

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

HTH

Ollie Riches

"Chris Fink" <Ch*******@disc ussions.microso ft.com> wrote in message
news:56******** *************** ***********@mic rosoft.com...
I have determined that in order to read the temperature from the BIOS I
need
to access the Win32_Temperatu reProbe 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:W in32_Temperatur eProbe");
foreach (ManagementObje ct service in processClass.Ge tInstances())
{
Console.WriteLi ne("Service = " +
service.GetProp ertyValue("Curr entReading.Desc ription"));
}
"Reginald Blue" wrote:
Chris Fink wrote:
> 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/fil...id,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]

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
43177
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number (or would HDD be better, or both?) and put that info into VB prog so the program won't work on another computer. My program uses an MSAccess table. Much appreciated if you can help! Thanks
1
2309
by: Shawn | last post by:
what is the best practice for sizing the temp db in sql 2000? what the best way to free up temp db space without shutdown the sql? how to monitor temp db parameters?
3
2023
by: Subodh | last post by:
I've written a SP which does some complex calculations and in the end dumps data into 2 tables (master & detail) When I run this sp for smaller no of IDS (employees i.e for 13000 in Master and 60000 records in detail table) it takes around 3-4 hrs and if I run for all employees in the database (i.e. abt 60000 records in master and 180000 records in detail table) then it takes around 10hrs to complete. I'm using temp table to hold data...
0
434
by: hank | last post by:
Hi All How to monitor the temp space usage and determine which application is the highest usage of temp space? Thanks Hank
1
1798
by: just4me | last post by:
I would like to access the bios flash using watcom c. To start, I would like to be able to read the entire bios and back it up into a file. I can do everything except reading the bios flash. Any suggestions on how to do this?
1
1873
by: Altramagnus | last post by:
How to fetch BIOS info such as CPU Temp, Fan Rotation, etc, in ..NET Framework using C#?
0
7039
by: Taran | last post by:
I am having this issue with both Visual C++ 6.0 and Visual Studio 2005 Beta 2. I have the SDK and DDK installed. I am trying to write a program to retrieve the EDID for a specific monitor in a multi-monitor system. I already know how to get this information from the registry, but I wish to get the EDID from the monitor directly. So far I have been unable to compile my program. The compiler generates over 102 errors and 54 warnings,...
8
1736
by: Michael Kennedy | last post by:
Hi, I have been looking into the claim that the keyword lock is not safe when exceptions are possible. That lead me to try the following code, which I think has uncovered a serious error in the .NET 2.0 framework. Note that this runs better, but not perfectly, on .NET 1.1. Note: The numbers are line numbers needed to match the callstack of the exception below.
30
32431
by: Mike C# | last post by:
Hi all, anyone know if there are any Windows functions to retrieve CPU Fan Speed and CPU Temp? Or if it's a BIOS-level call, or something else? If someone out there could just point me in the right direction it would be appreciated. Thanks!
0
10553
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
12045
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8711
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4951
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.