Skip to content

Instantly share code, notes, and snippets.

@h4cc
Created November 11, 2013 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save h4cc/7420153 to your computer and use it in GitHub Desktop.
Save h4cc/7420153 to your computer and use it in GitHub Desktop.
/etc/cron.d/server_monitoring apt-get -y install smartmontools
# 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