CPU温度监控 [英] CPU temperature monitoring

查看:348
本文介绍了CPU温度监控的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关编程的项目,我想从我的CPU和GPU的访问温度读数。我将使用C#。从各种论坛我得到的IM pression有你为了访问这些信息对各种电路板需要的具体信息和开发者资源。我有一个微星NF750-G55主板。微星的网站没有任何我要找的信息。我想他们的技术支持,并与我交谈的代表表示,他们没有任何此类信息。必须有一种方式来获得信息。

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.

有什么想法?

推荐答案

有关至少事物的CPU方面,你可以使用WMI。

For at least the CPU side of things, you could use WMI.

命名空间\\对象是根\\ WMI,MSAcpi_ThermalZoneTemperature

样code:

ManagementObjectSearcher searcher = 
    new ManagementObjectSearcher("root\\WMI",
                                 "SELECT * FROM MSAcpi_ThermalZoneTemperature");

ManagementObjectCollection collection = 
    searcher.Get();

foreach(ManagementBaseObject tempObject in collection)
{
    Console.WriteLine(tempObject["CurrentTemperature"].ToString());
}

这会给你一个原始格式的温度。你必须从那里转换:

That will give you the temperature in a raw format. You have to convert from there:

kelvin = raw / 10;

celsius = (raw / 10) - 273.15;

fahrenheit = ((raw / 10) - 273.15) * 9 / 5 + 32;

这篇关于CPU温度监控的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆