Skip to content

Instantly share code, notes, and snippets.

@georgyangelov
Created June 4, 2013 20:50
Show Gist options
  • Save georgyangelov/5709474 to your computer and use it in GitHub Desktop.
Save georgyangelov/5709474 to your computer and use it in GitHub Desktop.
PowerShell script to log cpu usage over time
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