Created
June 4, 2013 20:50
-
-
Save georgyangelov/5709474 to your computer and use it in GitHub Desktop.
PowerShell script to log cpu usage over time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (1) { | |
sleep 10 | |
date >> 'tasks.txt' | |
Get-Process | Sort-Object CPU -desc | Select-Object -first 5 >> 'tasks.txt' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment