0
votes

I am running the following query and it is returning me multiple instances of the service eg firefox and firefox#1 firefox#2.

When I display a chart I get multiple lines rather than a single Firefox line with the average of all 3 instances into one.

Perf

| where InstanceName 
has "firefox" 
and CounterValue > 0

| summarize ProcessorUsage = avg(CounterValue)
by bin(TimeGenerated, 
5m), InstanceName 

So rather than return firefox#1 and firefox#2 is it possible to group the average of all 3.

I am looking to be able to see CPU usage on each process on VM rather than seeing multi instances of the same application.

1

1 Answers

2
votes

Update 0809: For add another instance like chrome

Perf 
| where  (InstanceName has "firefox" and CounterValue >0) or (InstanceName has "chrome" and CounterValue >0)
| extend new_InstanceName = iif(InstanceName has "firefox", "firefoxavg","chromeavg" ) 
| summarize ProcessorUsage = avg(CounterValue) by bin(TimeGenerated, 5m), new_InstanceName

You can add a new column(using extend operator) for the records which contains "firefox", then in the summary sentence, use the new column.

Code like below:

Perf
| where InstanceName has "firefox" and CounterValue > 0
| extend new_InstanceName ="firefoxavg"
| summarize ProcessorUsage = avg(CounterValue) by bin(TimeGenerated, 5m), new_InstanceName