[ntp:questions] Problem monitoring NTP synchronization status

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

eespejel at gmail.com writes:

>Hi there. I did just set up a Linux box to time synchronize to a Cisco
>router. I would like to have a way to know whenever the Linux box
>stops synchronizing (because of any network connecticity issue, for
>instance). any ideas?

if ! ntpq|grep '* name.of.router'>/dev/null; then
  mail -s "NTP sync has been lost" your.name at youremil.com

And put the shell script into crontab to run every minute. 
(your milage may vary)

More information about the questions mailing list