[ntp:questions] ntpd, boot time, and hot plugging

Brad Knowles brad at stop.mail-abuse.org
Wed Feb 9 16:52:50 UTC 2005

At 2:05 PM -0200 2005-02-09, Alain wrote:

>  Putting it in another way: If I configure a workstation with
>  - ntpd -g
>  - delete dift file only it it is +-500
>  - no ntpdate
>  then the clock will be right even if the clock battery is flat and then
>  ntpd will go on keeping the clock in synch?

	Note that the clock does have to be set within 34 years of the 
real value on bootup.  Otherwise, when ntpd sets the clock, there 
will be an overflow condition and ntpd won't be able to detect that 
it has set the clock to a wildly incorrect value.  Many Unix systems 
today, if they are booted after a BIOS battery failure, will come up 
with a system clock that has been reset to some time in 1968, 1969, 
or 1970.  This is now more than 34 years ago, so you will need to 
make sure that you take appropriate measures under these 

	Also note that if your system clock goes whacko after the initial 
startup, ntpd may choose to commit suicide and exit, and there's 
nothing you can do to stop that.  Exiting when faced with totally 
outrageous conditions is a perfectly normal state of affairs with 
Unix-type daemons, and you need to be prepared to monitor the 
existence of any critical programs on the system to make sure that 
they're running correctly.  This is true for ntpd, any other critical 
program running on the system.

	Depending on how you have constructed your /etc/ntp.conf file, it 
may take a little while longer to complete the initialization 
process.  However, those two caveats aside, what you have said is 

>  Even if some messages with the wrong time manage to get to the log before
>  the clock is corrected, this can be acceptable for a workstation. I will
>  just have to figure out how to issue a warning message.

	That's a normal state of affairs.

>  What happen if I set the sanity limit to 0?

	That's what "-g" does.  But it does this only once, on startup. 
After that, you're on your own.

Brad Knowles, <brad at stop.mail-abuse.org>

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."

     -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
     Assembly to the Governor, November 11, 1755

   SAGE member since 1995.  See <http://www.sage.org/> for more info.

More information about the questions mailing list