Forum Discussion

roopesh_shetty's avatar
roopesh_shetty
Copper Contributor
May 24, 2019
Solved

Query for extra column

Hi Guys,   We have this below Query which is providing us the output as list of servers whose Processor Utilization value is above 80%   Perf | where ObjectName == "Processor" and CounterName == ...
  • Meir_Mendelovich's avatar
    May 25, 2019

    roopesh_shetty 

    Here you go:

     

    Perf | where ObjectName == "Processor" and CounterName == "% Processor Time"
    | summarize AggregatedValue = avg(CounterValue), min(TimeGenerated), max(TimeGenerated)  by bin(TimeGenerated, 5m), Computer
    | where AggregatedValue > 80
    | extend Duration = max_TimeGenerated - min_TimeGenerated //Assuming a single time span in this 5m window

     

    You can also do daily aggregations per computer. Just add this at the end:

    | summarize sum(Duration) by bin_at(TimeGenerated,1d,startofday(now())) , Computer //Daily (calendar days) summary

     

    Hope it helps,

    Meir

Resources