top -b -n 1 -p `pgrep $PROCESS_NAME` | grep $PROCESS_NAME | awk {'print $9'}
Last active
April 20, 2016 01:43
-
-
Save zhiguangwang/b4537f45864161890ec650b0b5c479f5 to your computer and use it in GitHub Desktop.
Get CPU usage of a process by name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment