CPU/GPU监控.(C#中的温度,当前速度等)

cae*_*say 5 .net c# system-monitoring

我正在寻找一种监控系统统计信息的方法.

以下是我的主要兴趣点:

  • CPU Tempature
  • CPU速度(每秒周期)
  • CPU负载(空闲百分比)
  • GPU Tempature

其他一些兴趣点:

  • 内存使用情况
  • 网络负载(流量上/下)

我的最终目标是编写一个可用于在后台轻松运行的应用程序,并允许为某些操作设置许多事件,例如:When processer temp gets to 56C -> Do _Blank_等等.

所以这给我留下了两个要点.

  1. 对于这类事情,是否已经存在一个框架?
  2. 如果不是#1,我该怎么做呢?

脚注

如果代码是另一种.net语言,那没关系.

cae*_*say 2

好吧,我想出了如何获得我的用法!1 下,3 去。

CPU使用率:

using (PerformanceCounter pc = new PerformanceCounter("Processor", "% Processor Time", "_Total"))
{
    while (true)
    {
        Console.WriteLine(pc.NextValue());
        Thread.Sleep(100);
    }
}
Run Code Online (Sandbox Code Playgroud)