monitoring NTP

Tom Metro tmetro-blu-5a1Jt6qxUNc at public.gmane.org
Thu Jul 2 20:11:45 EDT 2009


I rebooted a MythTV server coincidentally when local DNS happened to not 
be working, and when ntpd started, it wasn't able to resolve the address 
of the server it was set to synchronize with. Looking at the logs, it 
says it gave up after a few tries, which is disappointing.

Even if it had resumed trying later, it isn't clear that it would have 
corrected the system time (which was off by hours, due to a dead 
motherboard battery), as a manual restart of ntpd didn't resolve the 
problem. I had to stop it (otherwise there is a port conflict), run 
ntpdate, then restart ntpd. I thought ntpd stepped the time if there was 
a large delta. (According to /etc/default/ntp the -g option is being 
specified, which is supposed to permit nptd to make large steps when 
initially started.)

This same Ubuntu system once had a problem where ntpd mysteriously 
exited (probably when a libc or similar update was installed, which 
kills and restarts services), so I'm thinking its time to put some 
monitoring in place, but I'd like something fairly light weight. A 
script or maybe a monit config. Though simply checking that ntpd is 
running wouldn't do it. It needs to periodically check the the delta 
between itself and another server and complain when a threshold is 
exceeded. That seems to be beyond what monit can do.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/





More information about the Discuss mailing list