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

Arpith Nayak arpithnayak at gmail.com
Wed Sep 5 12:33:54 UTC 2012


I do not follow. The BIOS battery is not the issue. The issue is that it is
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?
Also what is the 11 min rtc mode on Linux?

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?

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