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"
![](https://1.bp.blogspot.com/-eQ9pTCsjxe0/WLeO3b1nk-I/AAAAAAAAC48/P-lurDPsZCY0toXhTIFAUhthfXIkydrLwCLcB/s640/topmemory100MB.jpg)
CPU consuming processes:
wmic path Win32_PerfFormattedData_PerfProc_Process where PercentProcessorTime!=0 get Name,PercentProcessorTime
![](https://3.bp.blogspot.com/-6YdVxX8QIoI/WLeVb_1bv5I/AAAAAAAAC5M/goVE3_9Lr6IYI9YzewIZ54KgCQocy5WIwCEw/s1600/TopCPU.jpg)
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"
![](https://1.bp.blogspot.com/-eQ9pTCsjxe0/WLeO3b1nk-I/AAAAAAAAC48/P-lurDPsZCY0toXhTIFAUhthfXIkydrLwCLcB/s640/topmemory100MB.jpg)
CPU consuming processes:
wmic path Win32_PerfFormattedData_PerfProc_Process where PercentProcessorTime!=0 get Name,PercentProcessorTime
![](https://3.bp.blogspot.com/-6YdVxX8QIoI/WLeVb_1bv5I/AAAAAAAAC5M/goVE3_9Lr6IYI9YzewIZ54KgCQocy5WIwCEw/s1600/TopCPU.jpg)
Top CPU consuming processes that are running for more than 5 minutes:
tasklist /fi "cputime gt 00:05:00"
No comments:
Post a Comment