does anyone know why my program cant find my cpu temps or my motherboard 12v rail readings
22 Replies
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/@❤RieBi&❤ its too long for that
BlazeBin - txyfrknlqiit
A tool for sharing your source code with the world!
What's the actual problem with it? Why do you think that it fails?
Because I get 0 degrees cpu temp and 0 12v rail voltage
Have you thought about asking the authors of LibreHardwareMonitor?
No do I just go on the GitHub page for that
Start by searching the existing discussions and issues on their github project
Whittle your code down to the minimum which reproduces the problem: you don't need anything except
GetCPUTemperature
really
And do debug that a bit: you return 0
if you don't find any CPU hardware, or don't find any temperature sensors on the cpu, so find out whihc bit isn't working as you expect
There's also this bit from the README:
Some sensors require administrator privileges to access the data. Restart your IDE with admin privileges, or add an app.manifest file to your project with requestedExecutionLevel on requireAdministrator.Is that the problem?
ok with admin it gets my cpu temps but not my 12v rail
@canton7 do you know why this could be
I've never used that library, so no. What exactly is the problem: which line of code exactly doesn't do what you expect?
Which line doesn't do what you expect?
Do you not find any hardware? No motherboard hardware? No motherboard sensors? No voltage sensors? Find a voltage sensor, but it doesn't have a value? Etc etc
it just gives me 0 its a winsform program so i dont know how view the output of this
to find the sensor
i dont know if it finds it
Please read what I'm asking. Don't just ignore it
Debug your code. Understand what it's doing. Use the debugger, or even Console.WriteLine
the whole part ig it just isnt getting me the voltage
where do i see the output because in output window in visual studio theres nothing about it
No, "the whole part" doesn't answer my question. Which specific bit of the code isn't doing what you expect? I listed a few options
Console.WriteLine normally logs to the Output pane. Try Debug.WriteLine
that gives me errors
So fix them
debug doesnt exist
Yes it does. You might need to add a using statement. Ctrl+. on the squiggled code to give you options
Hardware: ASUS PRIME B550M-A WIFI II
Subhardware: Nuvoton NCT6798D
Sensor: Fan #1, Type: Control, Value: 39.607845
Sensor: Fan #2, Type: Control, Value: 39.607845
Sensor: Fan #3, Type: Control, Value: 67.84314
Sensor: Fan #4, Type: Control, Value: 60
Sensor: Fan #5, Type: Control, Value: 60
Sensor: Fan #6, Type: Control, Value: 100
Sensor: Fan #7, Type: Control, Value: 100
Sensor: Vcore, Type: Voltage, Value: 0.504
Sensor: Voltage #2, Type: Voltage, Value: 0.99200004
Sensor: AVCC, Type: Voltage, Value: 3.3920002
Sensor: +3.3V, Type: Voltage, Value: 3.2800002
Sensor: Voltage #5, Type: Voltage, Value: 1.008
Sensor: Voltage #6, Type: Voltage, Value: 0.808
Sensor: Voltage #7, Type: Voltage, Value: 0.99200004
Sensor: 3VSB, Type: Voltage, Value: 3.3920002
Sensor: VBat, Type: Voltage, Value: 3.328
Sensor: VTT, Type: Voltage, Value: 0.90400004
Sensor: Voltage #11, Type: Voltage, Value: 0.4
Sensor: Voltage #12, Type: Voltage, Value: 0.4
Sensor: Voltage #13, Type: Voltage, Value: 1.0400001
Sensor: Voltage #14, Type: Voltage, Value: 0.984
Sensor: Voltage #15, Type: Voltage, Value: 0.984
Sensor: Temperature #1, Type: Temperature, Value: 38.5
Sensor: Temperature #2, Type: Temperature, Value: 36
Sensor: Temperature #3, Type: Temperature, Value: 26.5
Sensor: Temperature #4, Type: Temperature, Value: 36
Sensor: Temperature #5, Type: Temperature, Value: 36
Sensor: Temperature #6, Type: Temperature, Value: 27
Sensor: Fan #1, Type: Fan, Value: 1245.3875
Sensor: Fan #2, Type: Fan, Value: 1104.7463
Sensor: Fan #3, Type: Fan, Value: 0
Sensor: Fan #4, Type: Fan, Value: 0
Sensor: Fan #5, Type: Fan, Value: 0
Sensor: Fan #6, Type: Fan, Value: 0
Sensor: Fan #7, Type: Fan, Value: 0
i dont think it can find it although it shows up in hw monitor but not librehardware monitor