[PC-BSD Testing] ntpd and drift file

Kris Moore kris at pcbsd.com
Thu Apr 9 07:11:05 PDT 2009


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,

Can you re-confirm this bug in 7.1? On my system here, i see it using -f 
ntpd.drift, but if I look in /var/db/ I have ntpd.drift and ntp.drift 
both now. It looks like the ntpd is creating the drift file now? Does it 
do that on yours?


-- 

Kris Moore
PC-BSD Software
http://www.pcbsd.com


More information about the Testing mailing list