Created
July 7, 2011 07:36
-
-
Save btotr/1069051 to your computer and use it in GitHub Desktop.
CPU snapshot
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
for i in {1..10}; do ps -e -o pcpu -o pid | grep 91422 | grep -v grep | awk '{print $1}'; sleep 1; done | awk '{sum+=$1} END {print sum/10}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the pid 91422 to your own