Forum Discussion
Ruheena
Oct 29, 2020Former Employee
Available Memory percentage and CPU utilization on Virtual Machines
Hello,
I trying to get list of the VMs that have available memory below 20% and CPU Utilization above 50%. I have this below two queries for Memory and CPU. Can you please suggest on how to join bo...
Noa Kuperberg
Microsoft
Nov 01, 2020To make it most "elegant", prepend your queries with a let statement for the CPU usage:
let CPU_usage=
Perf
| where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total"
| summarize AggregatedValue = avg(CounterValue) by Computer, bin(TimeGenerated, 1h)
| where AggregatedValue >50;
Then, append your existing memory query with:
| join CPU_usage() on Computer
HTH