It is at time important to find out what other processes are doing in term of CPU and memory utilization, following commands are helpful for ad-hoc or reporting purpose.
Top 5 Memory consuming processes:
Powershell > get-wmiobject WIN32_PROCESS | Sort-Object -Property ws -Descending|select -first 5|Select processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)}},@{Name="ProcessID";Expression={[String]$_.ProcessID}},@{Name="UserID";Expression={$_.getowner().user}}
Memory consuming processes more than 100MB
tasklist /FI "MEMUSAGE ge 100000"
CPU consuming processes:
wmic path Win32_PerfFormattedData_PerfProc_Process where PercentProcessorTime!=0 get Name,PercentProcessorTime
Top CPU consuming processes that are running for more than 5 minutes:
tasklist /fi "cputime gt 00:05:00"
Top 5 Memory consuming processes:
Powershell > get-wmiobject WIN32_PROCESS | Sort-Object -Property ws -Descending|select -first 5|Select processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)}},@{Name="ProcessID";Expression={[String]$_.ProcessID}},@{Name="UserID";Expression={$_.getowner().user}}
Memory consuming processes more than 100MB
tasklist /FI "MEMUSAGE ge 100000"
CPU consuming processes:
wmic path Win32_PerfFormattedData_PerfProc_Process where PercentProcessorTime!=0 get Name,PercentProcessorTime
Top CPU consuming processes that are running for more than 5 minutes:
tasklist /fi "cputime gt 00:05:00"
No comments:
Post a Comment