Skip to content

Instantly share code, notes, and snippets.

@rahulinux
Created September 2, 2013 15:38
Show Gist options
  • Save rahulinux/6414198 to your computer and use it in GitHub Desktop.
Save rahulinux/6414198 to your computer and use it in GitHub Desktop.
Print Top 10 Process using high %CPU
GetTopProcess() {
ps --no-headers -eo "%cpu,%mem,cmd,etime" |
sort -t. -k1 -r |
head -10
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment