Difference between revisions of "Windows High CPU Trace via Process"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "# Get reason for high cpu Run with admin privileges ## Get top processes ``` PS C:\> Get-Counter -ErrorAction SilentlyContinue '\Process(*)\% Processor Time' | Select-Objec...")
 
(No difference)

Latest revision as of 21:27, 21 September 2021

Get reason for high cpu

Run with admin privileges

Get top processes

PS C:\> Get-Counter -ErrorAction SilentlyContinue '\Process(*)\% Processor Time' | Select-Object -ExpandProperty countersamples| Select-Object -Property instancename, cookedvalue| ? {​​​​​​$_.instanceName -notmatch "^(idle|_total|system)$"}​​​​​​ | Sort-Object -Property cookedvalue -Descending| Select-Object -First 10| ft InstanceName,@{​​​​​​L='CPU';E={​​​​​​($_.Cookedvalue/100/$env:NUMBER_OF_PROCESSORS).toString('P')}​​​​​​}​​​​​​ -AutoSize

Path : C:\Program Files\Sumo Logic Collector\jre\bin\java.exe

Get Process info

PS C:\> Get-Process java | Format-List *

Get logs

get-content "C:\Program Files\Sumo Logic Collector\logs\collector.log" -tail 10 -wait