Brennan
Brennan

Reputation: 11686

What is the easiest way to get the current total CPU load in .NET?

I found this answer, but it is far from a simple code snippet that I can use in an existing application.

controlling CPU utilization

There has to be a better way to do this with .NET 3.5 by now. Is there a way to poll the total CPU load for all threads?

Upvotes: 0

Views: 217

Answers (1)

Tony
Tony

Reputation: 1714

Performance counters is pretty much it. Performance counters can be used to get diagnostic data on everything from CPU to Network traffic.

Many of the counters in C# can be seen in action if you go to Start -> control panel -> administrative tools -> performance. It will even make pretty graphs. :)

Upvotes: 2

Related Questions