[ntp:questions] System time changes only on restarting ntpd service and query about iterating through the sources

unruh unruh at invalid.ca
Fri Sep 7 15:49:51 UTC 2012

On 2012-09-05, Arpith Nayak <arpithnayak at gmail.com> wrote:
> I do not follow. The BIOS battery is not the issue. The issue is that it is

It IS the issue if you wanted the system to start up with even a vague
:correct time." Jan1 1970 is way way outside ntpd's panic threshold, so
that might be the problem. However you do not tell us how you figured
out that ntp was not setting the system time the first time. 
A) What operating system?
B) What are the symptoms (If on Linux, what does "date" say? What does
hwclock say? What does ntpq -p say? 

> not able to update system time by running ntpd just once. Only once I stop
> the running daemon and start it off again it is altering system time and
> the time is being kept precisely from then on. If its a dead rtc clock then
> how can it keep time even when the system is not connected to the network?

BEcause it uses various counters connected to the cpu to keep the time,
not the RTC. The RTC is ONLY used at bootup.

> Also what is the 11 min rtc mode on Linux?

Every 11 min the time is written from the system clock to the rtc. This
totally messes up programs like hwclock which can estimate the rtc drift
rate to get a better estimate of the time on next switch on. But makes
sure that the rtc was equal to the system time at switch off. 

> Also about the second part of my question: Is there any way I can make ntpd
> query the same server sources present in the .conf file if the first time
> query to all sources was not successful?

Show us the symptoms. 

> On 2012-09-04, Arpith Nayak <arpithnayak at gmail.com> wrote:
>> Dead BIOS battery? Not really. But for the purposes of argument let us say
>> that we have a small hardware clock that needs to be set to present date
>> and time on every reboot. The default value if such an updation does not
> That is exactly what a dead bios battery behaves like.
>> occur is Jan 1, 1970 00:00. Now my implementation with ntpd wants this
>> clock to sync with a NTP time source every single time (it is connected to
> ntpd really does not care about the hadware clock. on Linux it sets up
> the 11 min rtc mode, bug does not really care.
>> the network all the time). For this I'm using NTP package ntp-4.2.6p5. I'm
>> calling ntpd with the -g  and -n flags.
>> i.e.     /usr/bin/ntpd -g n > /var/log/ntp.log
>> The conf file looks something like this:
>> driftfile /etc/ntp.drift
>> server <hostname> iburst
>> server <hostname> iburst
>> server <hostname> iburst
>> server <hostname> iburst
>> On Tue, Sep 4, 2012 at 2:12 PM, Harlan Stenn <stenn at ntp.org> wrote:
>>> Arpith Nayak writes:
>>> > Hi all,
>>> > I'm running into this problem.  The system time is set to 1970 after
>>> every
>>> > system reboot.
>>> Dead BIOS battery?
>>> > The first time I enable ntpd it is contacting the ntp source and
>>> > getting the updated time. However it is unable to change the system
>>> > time immediately. Only after I stop the service and start it again
>>> > does the system time get changed. Has anyone else observed this
>>> > behaviour?
>>> What version of NTP?  What startup command-line flags are you using?
>>> What does your ntp.conf file look like?
>>> > Also is there any way to iteratively consult the various server
>>> > addresses given in the ntp.conf file?
>>> ntpd checks all of the servers and server addresses listed in the
>>> ntp.conf file.
>>> H

More information about the questions mailing list