Created
June 2, 2017 15:33
-
-
Save jhazelwo/e8a6d0681d399de878efc18386e23687 to your computer and use it in GitHub Desktop.
Visualize CPU idle time as dots on the command line.
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 | |
# idle cpu as dots | |
vmstat -n 1 | while read line; do | |
length=`echo $line|awk '{print $15}'|egrep "^[0-9]+$"` | |
test -n "$length" && { | |
echo -n $length | |
for e in `seq 1 $length `; do echo -n .; done; | |
echo ''; | |
} || true | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment