Windows Performance: CPU High Utilization

  • This will give the current queue length: Get-Counter -Counter “\System\Processor Queue Length” 

 

  • This will give the average utilization of your CPU: “Average CPU Usage per 10 samples: $([math]::round((get-counter -Counter “\Processor(_Total)\% Processor Time” -SampleInterval 1 -MaxSamples 10 | select -ExpandProperty countersamples | select -ExpandProperty cookedvalue | Measure-Object -Average).average,2))%”

 

  • This will give you the top processes that is taking too much of your CPU’s memory: get-wmiobject Win32_PerfFormattedData_PerfProc_Process |?{$_.name -ne “_Total” -and $_.name -ne “Idle” -and $_.percentprocessortime -ge 10} |select @{n=”Application”;e={$_.name}},@{n=”CPU”;e={$_.PercentProcessorTime}} | Sort-Object CPU -Descending | ft -auto

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: