[ntp:questions] Problem monitoring NTP synchronization status

Unruh unruh-spam at physics.ubc.ca
Wed Apr 23 06:19:43 UTC 2008


hal-usenet at ip-64-139-1-69.sjc.megapath.net (Hal Murray) writes:


>>$!/bin/sh
>>if ! ntpq|grep '* name.of.router'>/dev/null; then
>>  mail -s "NTP sync has been lost" your.name at youremil.com
>>fi
>>
>>And put the shell script into crontab to run every minute. 
>>(your milage may vary)

>That could lead to a lot of clutter in your mailbox.

Yup, it sure could. But you would know when something went wrong.

(Of course you could become more sophisticated and not send the mail if the
last time the shell ran, mail was sent, etc. ) All I am pointing out to  the
Op is that running a cron shell can be used to notify. How often he wants
to be notified, etc, it up to him. 







More information about the questions mailing list