Created
April 3, 2017 03:08
-
-
Save youhide/8869d90c0529ae8ca2ece336f90d0480 to your computer and use it in GitHub Desktop.
Restart something on load > 100
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 | |
LOAD=$(awk '{print $1}' /proc/loadavg) | |
if [ $(echo "$LOAD > 100" | bc) = 1 ]; then | |
/etc/init.d/php-fpm restart | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment