Last active
September 25, 2015 14:32
-
-
Save andrewpmiller/80b2947a3cc60091c17b to your computer and use it in GitHub Desktop.
This miniscule script is a hack to return the current CPU load.
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
#!/bin/bash | |
# getload | |
# | |
# This miniscule script is a hack to return the current | |
# CPU load. It is simply stripping off the first | |
# value returned from loadavg. | |
cat /proc/loadavg | head -n1 | cut -d " " -f1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment