Skip to content

Instantly share code, notes, and snippets.

@eidantoei
Created April 13, 2011 20:34
Show Gist options
  • Save eidantoei/918344 to your computer and use it in GitHub Desktop.
Save eidantoei/918344 to your computer and use it in GitHub Desktop.
while :; do clear; uptime; echo; /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /; if [ $? -eq 0 ]; then echo -e "\e[0;32m[OK]\e[0m"; elif [ $? -eq 1 ]; then echo -e "\e[0;33m[WARNING]\e[0m"; elif [ $? -eq 2 ]; then echo -e "\e[0;31m[CRITICAL]\e[0m"; fi; sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment