[ntp:questions] Re: Is ntp really what I need?

Steve Kostecke kostecke at ntp.isc.org
Tue Feb 15 03:12:03 UTC 2005

On 2005-02-14, Paul Hilton <paul_hilton at somedomain.com> wrote:

> I am using SuSE 9.0, I start ntpd on boot, and I have problems with my
> clock:


> 11 Feb 12:42:12 ntpd[1792]: time reset 6.183748 s
> 11 Feb 13:08:08 ntpd[1792]: time reset 3.694851 s
> 11 Feb 14:39:59 ntpd[1792]: time reset 84.642767 s
> 11 Feb 15:01:43 ntpd[1792]: time reset 9.474174 s
> 12 Feb 01:07:49 ntpd[1792]: time correction of 1008 seconds

That's 16.8 minutes...

>  exceeds sanity limit (1000); set clock manually to the correct UTC
>  time.

> 14 Feb 10:33:12 ntpd[21757]: restart messages elided
> 14 Feb 10:53:42 ntpd[21755]: time reset 0.656745 s

ntpd steps the time and makes those log entries when the clock is more
than 128ms off.

When ntpd is operated in a unicast association it eventually extends its
polling period to 1024 seconds, or ~17 minutes. This means that your
system can go up to 17 minutes between receiving time packets. If you
are only polling a local LAN time server server you could try reducing
the maximum polling interval. Another approach is to use a stable system
on your LAN as a multicast or broadcast server on your LAN and this
system in the appropriate client mode. Then this system will receive an
ntp packet every 64 seconds.

> Would I just be better off running ntpd -q hourly as a cron job?

'ntpq -q' will abort if the clock is more than 1000 seconds off. Use
'ntpd -gq' to override the 1000 second limit.

At the rate of drift you show above the clock will most likely step each time
'ntpd -gq' is run. You should watch the logs to ensure the the step
amount is acceptable. And be prepared to run the cron job as frequently
as necessary.

Another approach is to use something (cron job or a monitor app) to
restart ntpd as needed. You really don't need much more than
'pgrep ntpd || ntpd -g'

Steve Kostecke <kostecke at ntp.isc.org>
NTP Public Services Project - http://ntp.isc.org/

More information about the questions mailing list