[ntp:questions] Re: keeping ntpd running

Richard S. Shuford shuford at list.stratagy.REM0VE-THlS-PART.com
Wed Sep 24 03:18:19 UTC 2003

Ian Diddams <didds2(at)excite.com> wrote:
:: we have systems running ntpd started by startup script.  
:: Typically the process dies at some time
::                            ^^^^^^^^^^^^
:: and the box's date stamp "erodes" over time.
:: So--how to keep the ntpd daemon running even when it dies?

Have you checked to see precisely when the "some time" is?
Check to see if ntpd runs for about 20 minutes after reboot  
and then quits.   Just to quickly see if it is running, do

    $ ntpq -p

which will report "connection refused" if ntpd is not there.

If ntpd is found to run for 20 minutes and then quit, what's  
going on is probably this:  If the ntpd daemon, when starting
up, finds that the system's internal clock is more than 1000
seconds different from the time ticks received from external
sources, ntpd wants a human to figure out why and make an
intentional clock change; the daemon is programmed not to
simply trust the external ticks and change the system's clock
on its own.  So the daemon rather quietly logs a message:

    time error is way too large (set clock manually)

and then it gives up.  Without updating the clock.  If left
to its own devices, it will never succeed, and the system's
time setting will erode until you have the Temporal Dust Bowl.

Sample-to-sample variation in clock chips, even in PCs that
are allegedly identical, could cause just one machine out of
50 to have a "bad enough" clock that the time error grows   
too large for ntpd to deal with.

If you have the "ntpdate" program, you may want to invoke
it in your start-up script before you try to start "ntpd".
The idea is to set the system clock approximately correct
before  handing the ball to ntpd.  (Solaris does something
like this when starting its xntpd program.)  Or use
"ntpd -g".  See the NTP FAQ:


Sun distributes some Blueprints which give advice on how to
configure the NTP package distributed with Solaris, most of
which applies to the newer releases of NTP as well.



/usr/xpg4/bin/date '+%C%y-%m-%d_%H:%M:%S'

More information about the questions mailing list