Reputation: 25631
I'm tracking the CPU utilisation for the process as part of regular heartbeat for an application, using code something similar to this:
var process = Process.GetCurrentProcess();
_processCpuCounter = new PerformanceCounter("Process", "% Processor Time", process.ProcessName);
...
...
...
var processCPU = Convert.ToInt32(_processCpuCounter.NextValue());
NextValue is only evaluated once per minute.
I've observed the processCPU
value to be greater than 100%, can anyone explain why this would be happening as mathematically it does not make sense?
Upvotes: 1
Views: 1397
Reputation: 3582
Each core of the CPU has 100%, so 120% on a dual core could mean one is at 100% and the other is at 20%.
Upvotes: 3