Created
December 2, 2023 11:55
-
-
Save abramovk/d7556956e43b519ae9deed0706f212b9 to your computer and use it in GitHub Desktop.
CPU usage
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
#!/bin/sh | |
grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment