Skip to content

Instantly share code, notes, and snippets.

@justjkk
Created August 8, 2012 07:45
Show Gist options
  • Save justjkk/3293216 to your computer and use it in GitHub Desktop.
Save justjkk/3293216 to your computer and use it in GitHub Desktop.
Check load on the server
LOAD_THRESHOLD="2.0"
if [ $(echo $(cut -d" " -f2 /proc/loadavg) " > $LOAD_THRESHOLD" | bc -l) -eq 1 ]; then
echo "High load";
else
echo "Low load";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment