[PC-BSD Testing] ntpd and drift file

Fabrizio Parrella fabrizio at bibivu.com
Thu Apr 9 15:54:18 PDT 2009


ok, changing the ntp.conf looks like the best option, so ntpd will create 
and use the correct file.

if it is vmware we need to disable ntpd as it doesn't work and we should use 
ntpdate instead.. at least for now that it is still provided.

fabry
----- Original Message ----- 
From: "Kris Moore" <kris at pcbsd.com>
To: "PC-BSD Testing list" <testing at lists.pcbsd.org>
Sent: Thursday, April 09, 2009 1:25 PM
Subject: Re: [PC-BSD Testing] ntpd and drift file


> Fabrizio Parrella wrote:
>> I do not have the ntpd.drift file.
>>
>>>From what I read online it should create the file even on older versions 
>>>and
>> for some reason it doesn't.
>>
>> Even if I am not getting any start-up errors from NTP on 7.1, I would
>> suggest to override the settings anyway to avoid possible problems with
>> future updates... plus, the time is not updating unless I change that
>> setting (normal behavior if I don't have the file).
>>
>> Fabry
>>
>>
>> ----- Original Message ----- 
>> From: "Kris Moore" <kris at pcbsd.com>
>> To: "PC-BSD Testing list" <testing at lists.pcbsd.org>
>> Sent: Thursday, April 09, 2009 10:11 AM
>> Subject: Re: [PC-BSD Testing] ntpd and drift file
>>
>>
>>> Fabrizio Parrella wrote:
>>>> I have been having problems with update the time since 1.5 (can't 
>>>> recall
>>>> 1.4), and today I think I figure out the issue.  the drift file is
>>>> missing or bad configured
>>>> in 1.5.1 and 7.0.2:
>>>> # ps awwx | grep ntp
>>>> 1025  ??  Ss     0:04.39 /usr/sbin/ntpd -g -c /etc/ntp.conf -p
>>>> /var/run/ntpd.pid -f /var/db/ntpd.drift
>>>> # ls -l /var/db/ntpd.drift
>>>> ls: /var/db/ntpd.drift: No such file or directory
>>>> # ls -l /var/db/ntp.drift
>>>> -rw-r--r--  1 root  wheel  7 Apr  8 14:59 /var/db/ntp.drift
>>>>
>>>> looks like that the correct value is in ntp.drift, but the program is
>>>> called with ntpd.drift.
>>>>
>>>> The /etc/ntp.conf is correctly trying to override that value, but maybe
>>>> the command line value is "stronger" than the config file...
>>>> The ntpd.conf is specified in the /etc/defaults/rc.conf
>>>> If I override that value in /etc/rc.conf everything works ok and ntpd
>>>> starts without giving an error in the /var/log/messages
>>>>
>>>> so, the solution is simple enough:
>>>> #echo ntpd_flags=\"-p /var/run/ntpd.pid -f /var/db/ntp.drift\" >>
>>>> /etc/rc.conf
>>>> or (let's the /etc/ntp.conf decide which is the file):
>>>> #echo ntpd_flags=\"-p /var/run/ntpd.pid\" >> /etc/rc.conf
>>>> or (but I like better the second one)
>>>> #ln -s /var/db/ntp.drift /var/db/ntpd.drift
>>>> followed by a computer restart or:
>>>> #/etc/rc.d/ntpd restart
>>>> and this will generate a nice message (got an error message in 1.5, in 
>>>> 7
>>>> it doesn't work but no error messages):
>>>> # tail -2 /var/log/messages
>>>> Apr  8 16:49:08 h2113 ntpd[1025]: ntpd exiting on signal 15
>>>> Apr  8 16:49:08 h2113 ntpd[42455]: ntpd 4.2.4p5-a Mon Nov 24 19:44:30 
>>>> EST
>>>> 2008 (1)
>>>> #
>>>>
>>>> Fabry
>>>>
>>> Fabry,
>>>
>
> Fabry, Here's another possible solution. If you edit /etc/ntp.conf and
> change the driftfile to /var/db/ntpd.drift does that work? Looking at
> /etc/defaults/rc.conf the ntpd_flags are already set to use ntpd.drift,
> and I would prefer to not override that if its not necessary and fixing
> ntp.conf does the trick.
>
>
>
> -- 
>
> Kris Moore
> PC-BSD Software
> http://www.pcbsd.com
> _______________________________________________
> Testing mailing list
> Testing at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/testing
> 



More information about the Testing mailing list