Click here to Skip to main content
Click here to Skip to main content

Get CPU Temperature in .Net

By , 9 Jan 2010
Rate this:
Please Sign up or sign in to vote.
It is possible to retrieve the current temperature of the cpu easily using System.Management namespace. This is useful for monitoring your cpu for overheating or the fan for malfunctioning. To get the temperature we issue a WMI Query against the MSStorageDriver_ATAPISmartData and read the 115th byte in its VendorSpecific array property where the temperature is stored. I have encountered cases where the temperature byte is different than 115 because this is vendor specific, but for the most cases its 115.
the implementation is posted here with more explanation
Get CPU Temperature in .Net[^]


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Ali Tarhini
Software Developer (Senior) Microgen
Lebanon Lebanon
For more articles and extreme topics please check out my personal website

Comments and Discussions

GeneralThe link seems to be broken. PinsubeditorIndivara17-Feb-11 21:25 
GeneralPut the code in the tip PinmvpHenry Minute18-Feb-11 1:04 
Include snippets of the more interesting parts from the code in the tip, together with an explanation.
I have not followed your link but others have stated that the link is broken and in any event it does not show the CPU temperature but the Disk temperature.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

GeneralNot the CPU temperature PinmembermrMercury4-Mar-10 7:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140421.2 | Last Updated 9 Jan 2010
Article Copyright 2010 by Ali Tarhini
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid