How to get the temperature of motherboard of a PC

2020-04-07 09:58发布

does any one know how to get the current motherboard, processor or HD temperature statistics?
In GNU/Linux, I know I could use something like hddtemp or sensord to get the info, and then parse it... but in Windows: How can I do this? And, Can it be done with with C# or Java or any other hight level programming language?
Thanks!

4条回答
做自己的国王
2楼-- · 2020-04-07 10:25

The problem with temperature and other monitoring sensors is that there is no common protocol on the hardware level, nor drivers allowing to retrieve that information with common API.

Software like already mentioned SpeedFan and HWMonitor (from the makers of CPU-Z utility) work by painstakingly cataloging the various sensors and bus controllers, and implementing corresponding protocols, usually using kernel-mode driver to access SMBus devices.

To embed this functionality in you own software, you can either develop this functionality yourself (possibly reducing the amount of work by tailoring it to your specific hardware, and using linux code from www.lm-sensors.org as reference) or purchasing commercial library that implements it. One, used by HWMonitor, is available here.

good luck

查看更多
▲ chillily
3楼-- · 2020-04-07 10:32

I would argue that when the right configurations are in place, it can be superior to windows's one.

http://www.lm-sensors.org/ is what does all the work. I had that plugged into RRDgraph & Munin and I was monitoring the temperature of my room over a period of almost a year and had nice pretty graphs. Also showed me my CPU fan was slowly wearing down, and I could see the line sloping down over a long period and know it was on the way out.

http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers/applications is what you want.

(Oh wait, I fail. You're on *nix wanting to do it on Windows, my bad :( ..um.. well. Good luck. Maybe I'll leave this here in case somebody finds your post while searching for the contrary)

Back when I did use windows, all I recall is Ye' Old Motherboard Monitor ( Discontinued ). Wiki article says there is speedfan and that looks like your best option. Programmatically, I guess you'll have to find the hardware specs and dig through Windows API and stackloads of arbitrary bus address offsets.

查看更多
别忘想泡老子
4楼-- · 2020-04-07 10:35

This is going to vary quite a bit depending on your hardware. Once you figure out from your hardware vendor whether you have sensors on your motherboard, you might look into using SNMP and the HOST-RESOURCE MIB.

Use the Add/Remove Windows Components Wizard under Management and Monitoring Tools to get SNMP installed. Then you should be able to ask your Windows box for lots of info using standard systems management software like OpenView or Nagios.

查看更多
Anthone
5楼-- · 2020-04-07 10:43

As @AndrewJFord suggest these methods vary from vendor to vendor, indeed from part to part, but I'll make some generalisations if that's ok.

  1. As far as I know all current mainstream processors by Intel, AMD and IBM have on-board thermal sensors with known exposed APIs for reading this data. I'm no expert in these APIs so don't know how similar they are but I'd be surprised if Intel's and AMDs API are that much different. If I were you I'd search for an open-source 'system management tool' (there are a few like this written as Apple Widgets by the way) and see how they do it.
  2. Motherboards vary a hell of a lot, some have extensive thermal senesoring, some none and all will have fairly different APIs. I'd start by contacting the support people at the company who makes your mobo-of-choice.
  3. In general I believe that only very high-end 15krpm SAS disks have built-in thermal sensors, I know that some mid-range systems have sensors taped to their case at the hub and report that back to the mobo. Really not sure on how to get at this info but again I'd start by speaking with the same people as the question above.

Now I'm a big HP user and all of their kit is instrumented by something called Insight Management Agents, of which there are versions available for Windows and most Linux's. What they do is gather all the system information from all their sensors (proc, memory, mobo, fans, disks etc) and expose that via an SNMP-based polling API or via an alert-based SNMP/SMTP/MAPI interface. I dare say IBM/Dell etc will have their own equally good and functionally similar versions but I don't know them sorry. If your machines are 'off-brand'/made-from-kit or you have no control then I'm not aware of any single method of getting at all this information easily.

查看更多
登录 后发表回答