2012-02-25 187 views

回答

6

如果你知道如何阅读在C#中的文件,你的计算机启用ACPI,您可以阅读其他Linux发行版文件

/proc/acpi/thermal_zone/THRM/temperature 

它可能是

/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

没有C#中,你可以使用这个命令:在输出中使用

sudo sensors 

标签可以在/etc/sensors3.conf