CPU温度监控
对于一个编程项目,我想访问 CPU 和 GPU 的温度读数。我将使用 C#。从各种论坛中,我得到的印象是,您需要特定的信息和开发人员资源才能访问各种主板的信息。我有一块 MSI NF750-G55 板。 MSI 的网站上没有我要查找的任何信息。我尝试了他们的技术支持,与我交谈的代表表示他们没有任何此类信息。必须有一种方法来获取该信息。
有什么想法吗?
For a programming project I would like to access the temperature readings from my CPU and GPUs. I will be using C#. From various forums I get the impression that there is specific information and developer resources you need in order to access that information for various boards. I have a MSI NF750-G55 board. MSI's website does not have any of the information I am looking for. I tried their tech support and the rep I spoke with stated they do not have any such information. There must be a way to obtain that info.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
至少对于 CPU 方面的事情,您可以使用 WMI。
命名空间\对象是
root\WMI, MSAcpi_ThermalZoneTemperature
示例代码:
这将为您提供原始格式的温度。你必须从那里进行转换:
For at least the CPU side of things, you could use WMI.
The namespace\object is
root\WMI, MSAcpi_ThermalZoneTemperature
Sample Code:
That will give you the temperature in a raw format. You have to convert from there:
在 Windows 上进行硬件相关编码的最佳方法是使用 WMI 是 Microsoft 的一个
Code Creator
工具,该工具将根据您在硬件相关数据中查找的内容以及您想要使用的 .Net 语言为您创建代码。目前支持的语言有:C#、Visual Basic、VB Script。
The best way to go for hardware related coding on windows is by using WMI which is a
Code Creator
tool from Microsoft, the tool will create the code for you based on what you are looking for in hardware related data and what .Net language you want to use.The supported langauges currently are: C#, Visual Basic, VB Script.
请注意,
MSAcpi_ThermalZoneTemperature
并不提供 CPU 的温度,而是提供主板的温度。另请注意,大多数主板不通过 WMI 实现此功能。您可以尝试一下开放硬件监视器,尽管它缺乏对最新处理器的支持。
从官方源下载 zip 文件,解压并添加对项目中 OpenHardwareMonitorLib.dll 的引用。
Note that
MSAcpi_ThermalZoneTemperature
does not give you the temperature of the CPU but rather the temperature of the motherboard. Also, note that most motherboards do not implement this via WMI.You can give the Open Hardware Monitor a go, although it lacks support for the latest processors.
Download the zip from the official source, extract and add a reference to OpenHardwareMonitorLib.dll in your project.