Created
September 2, 2013 15:38
-
-
Save rahulinux/6414198 to your computer and use it in GitHub Desktop.
Print Top 10 Process using high %CPU
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
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