tags:

views:

87

answers:

1

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

http://stackoverflow.com/questions/261089/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?

+1  A: 

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. :)

Tony