

But have a look at the counter value, 1492? Out of what? 1500? 2000?Īfter some noodling on this, the CounterValue for Process is actually the total of all CPUs together. Here are our results, great you can see we found the process, HandBrake, that’s taking up our CPU. Note 50 in this instance is not a percentage, and you’ll see why in a minute. This query finds all instance in the last hour, with the ObjectName of Process, Countername of % Processor Time, the instances name is not _Total or Idle, and the CounterValue is above 50.

You can find what Performance objects you have using the distinct operator, which I talk about here. Part of the counters includes a new ObjectName we can use call Process. To find what processes are using CPU we’re going to use our new counters mentioned above.

| where CounterName = "% Processor Time"Īs you can see I have two machines with over 90% CPU usage. Perhaps you have a query that might look similar to this to find high CPU and alert on it. | summarize dcount(InstanceName) by Computer I’ll also be posting the queries for easy copy and paste. I changed the query a little for the main query we’ll be using, but here’ is what it shows. This post details how to get a CPU count for your machines reporting to Log Analytics. We’ll also be using a query from the UK Azure blog You don’t specifically need User Time for this post, however it may come in handy in other instances. I have a post here that can help you with that. You’ll need to add the following performance counters: In this post I’ll show you how you can find high CPU processes in Azure Log Analytics.

But beyond that you were then logging into the server to run perfmon or some other tool, or if you were really fancy maybe you had a diagnostic script that would run and report back. When it comes to high CPU issues your monitoring solution may be able to tell you when CPU is high on any server. Staying on top of performance issues is a top priority for any ops team.
