1

Reproduce (or not):

using System;
using System.Management;
using System.Windows.Forms;

namespace WMISample
{
    public class MyWMIQuery
    {
        public static void Main()
        {
            try
            {
                ManagementObjectSearcher searcher = 
                    new ManagementObjectSearcher("root\\CIMV2", 
                    "SELECT * FROM Win32_PerfFormattedData_Counters_ThermalZoneInformation"); 

                foreach (ManagementObject queryObj in searcher.Get())
                {
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("Win32_PerfFormattedData_Counters_ThermalZoneInformation instance");
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("HighPrecisionTemperature: {0}", queryObj["HighPrecisionTemperature"]);
                }
            }
            catch (ManagementException e)
            {
                MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);
            }
        }
    }
}

OR: (which is how to get this code as well)

  1. Download the Microsoft WMI Code Creator from here: https://www.microsoft.com/en-us/download/details.aspx?id=8572
  2. Scroll down in "Classes (dynamic or static)" to: Win32_PerfFormattedData_Counters_ThermalZoneInformation
  3. Select HighPrecisionTemperature in the next box.
  4. Click the Search for Property Values button.

My results are ALWAYS: 3030, 3010, and 2900 [I know these are tenths of a degree Kelvin. The question is about the code ALWAYS returning those values though the temperature obviously does NOT stay the same (and to a tenth of a degree centigrade!).]

What might cause the system to always return these results instead of real ones?

CPU: i5 9600K

Motherboard: Gigabyte B365

ispiro
  • 26,556
  • 38
  • 136
  • 291
  • @AnonCoward I know. The question is about the code ALWAYS returning those values though the temperature obviously does NOT stay the same (and to a tenth of a degree centigrade!). – ispiro Oct 28 '21 at 19:25
  • What is HighPrecision about it is that it provides an extra digit in the counter value. That doesn't make your processor more capable. Intel processors provide only 7 bits of temperature data, unit is 1 degree C. – Hans Passant Oct 28 '21 at 20:20
  • @HansPassant Thanks. But this happens with the simple `Temperature` as well. It just returns 303, 301, and 290. Always. (Or perhaps you weren't answering the question, just pointing it out. Thanks.) – ispiro Oct 28 '21 at 20:26
  • @HansPassant Isn't only one of those temperatures from the CPU? The others are from different places on the motherboard and may be more exact. Isn't that correct? – ispiro Oct 28 '21 at 20:59

0 Answers0