OpenHardwareMonitor not showing all sensors

4.9k Views Asked by At

I am trying to get all the sensors that OpenHardwareMonitor can give. But i get almost all load type sensors ando not many temperature sensors:

This is my code:

{
            Computer myComputer = new Computer();
            myComputer = new Computer()
            {
                CPUEnabled =

                    true
            };

            myComputer.Open();
            Trace.WriteLine("");
            foreach (var hardwareItem in myComputer.Hardware)
            {
                if (hardwareItem.HardwareType == HardwareType.CPU)
                {
                    hardwareItem.Update();
                    foreach (IHardware subHardware in hardwareItem.SubHardware)
                        subHardware.Update();

                    foreach (var sensor in hardwareItem.Sensors)
                    {
                        Debug.WriteLine(sensor.Name + " " + sensor.SensorType + " " + sensor.SensorType);
                    }
                }
            }
        }

This is the result i get:

CPU Core #1 Load Load
CPU Core #2 Load Load
CPU Core #3 Load Load
CPU Core #4 Load Load
CPU Core #5 Load Load
CPU Core #6 Load Load
CPU Core #7 Load Load
CPU Core #8 Load Load
CPU Core #9 Load Load
CPU Core #10 Load Load
CPU Core #11 Load Load
CPU Core #12 Load Load
CPU Core #13 Load Load
CPU Core #14 Load Load
CPU Core #15 Load Load
CPU Core #16 Load Load
CPU Total Load Load

But i would like to get the CPU Temp and Volt, but i cant figure out a way to get them, also just to mention that if i use open hardware monitor app i can see all the sensors correctly.

Thanks so much for the help!

I have tried lots of tutorials, done the same in a subhardware loop but nothing shows up

2

There are 2 best solutions below

0
Michael Canseco On BEST ANSWER

Ive managed to fix it.

I was not implementing Ivisitor and LibreHardwareMonitor seems to be the updated version of the dll (i had to got it via nuget as it has to update some independeces)

Here i found the example code with the Ivisitor implemented: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor

1
Mike Mozhaev On

It might be that your hardware is not supported by OpenHardwareMonitor. There is a list of supported hardware on their page.

Also you might need to run your app as Administrator to get the required information. I was able to get the temperature sensors in the list, but without values. And I saw the values by running as administrator.