答案 0 :(得分:6)
如果您知道如何在C#中读取文件,并且您的计算机已启用ACPI,则可能能够读取文件
/proc/acpi/thermal_zone/THRM/temperature
在其他Linux风格上可能是
/proc/acpi/thermal_zone/THM0/temperature
你必须在linux上使用mono运行它。
using System;
using System.IO;
using System.Text;
class Test
{
public static void Main()
{
string path = @"/proc/acpi/thermal_zone/THRM/temperature";
if (!File.Exists(path))
{
Console.WriteLine("Could not find "+path);
return;
}
string readText = File.ReadAllText(path);
Console.WriteLine(readText);
}
}
答案 1 :(得分:-1)
没有C#,您可以使用此命令:
sudo sensors
输出中使用的标签可以在/etc/sensors3.conf