Skip to content

Instantly share code, notes, and snippets.

@jaymecd
Forked from h4cc/server_monitoring
Created February 23, 2014 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaymecd/9170026 to your computer and use it in GitHub Desktop.
Save jaymecd/9170026 to your computer and use it in GitHub Desktop.
# Cronjob for poor man monitoring of server health
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Every sunday, check for apt-get upgrades.
33 3 * * 0 root apt-get update ; apt-get -q --simulate upgrade
# Every sunday, check for SMART errors.
34 3 * * 0 root echo 'SMART Sectors'; smartctl -a /dev/sda | grep -i sector ; smartctl -a /dev/sdb | grep -i sector; echo 'SMART All'; smartctl -a /dev/sda ; smartctl -a /dev/sdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment