Created
April 11, 2018 09:39
-
-
Save valentt/5d9e7507b5b534dc9c1269ad30914801 to your computer and use it in GitHub Desktop.
babel-killer.sh
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 | |
LOAD=$(uptime | sed -n -e 's/^.*average: //p'| sed 's/ //g') | |
LOAD5=$(echo $LOAD | cut -d ',' -f 2) | |
LOAD500=$(awk -v var=$LOAD5 'BEGIN{print var * 100}') | |
[ $LOAD500 -gt 50 ] && reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment