|.: Poor man's reboot notification|
Sometimes you need to be notified about reboots of a machine without having the luxury of a proper monitoring system.
The following crontab entry triggers an e-mail when the host has been rebooted in the last 5 minutes.
*/5 * * * * [ $(sed -e 's/\..*//' /proc/uptime) -lt 540 ] && echo "Host has been rebooted! Uptime: $(uptime)"
blog comments powered by