How can I get CPU load per core in C#?

前端 未结 3 1868
谎友^
谎友^ 2020-12-02 00:46

How can I get CPU Load per core (quadcore cpu), in C#?

Thanks :)

3条回答
  •  醉梦人生
    2020-12-02 01:11

    Since cores show up as seperate CPUs to the OS, you use the same code you'd use to determine the load per CPU in a multiprocessor machine. One such example (in C) is here. Note that it uses WMI, so the other thread linked in the comments above probably has you most of the way there.

提交回复
热议问题