如何获取计算机的总CPU使用率? [英] how do I get my computer's total CPU usage?

查看:111
本文介绍了如何获取计算机的总CPU使用率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让我的程序监控计算机上的所有CPU使用情况。





谢谢高级。

解决方案

总计 CPU使用率?我可以马上告诉你 - 100%;-)







如果你需要它不是总数,但是每个进程,你可以使用中的类System.Diagnostics.PerformanceCounter

http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage- in-c [ ^ ]



祝你好运,

-SA


有几个例子。你试过什么?



http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c [ ^ ]



http://blogs.msdn.com/b/dotnetinterop/archive/2007/02/02/system-diagnostics-performancecounter-and-processor-time-on-multi-core-or- multi-cpu.aspx [ ^ ]


除了性能计数器之外还有其他任何方法。 ...?

Hi, how can I get my program to monitor all CPU usage from my computer.


Thanks in advanced.

解决方案

Total CPU usage? I can tell you right away — 100% ;-)

[EDIT]

And if you need it not total, but per process, you can use the class from System.Diagnostics.PerformanceCounter:
http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c[^]

Good luck,
—SA


there are a couple of examples out there. What have you tried?

http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c[^]

http://blogs.msdn.com/b/dotnetinterop/archive/2007/02/02/system-diagnostics-performancecounter-and-processor-time-on-multi-core-or-multi-cpu.aspx[^]


Is there any methods otherthan performance counter....?


这篇关于如何获取计算机的总CPU使用率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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