Last active
September 28, 2016 14:02
-
-
Save pierophp/04904e515bc6cca6947ec63d184704cc to your computer and use it in GitHub Desktop.
Get Total CPU Utilization
This file contains hidden or 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
top -bn2 | grep "Cpu(s)" | sed -n 2p | sed -e 's/%us//g' | sed -e 's/%sy//g' | awk '{print ($2 + $3)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment