ntpd - I'm sure I'm setting it up wrong, but I can't figure out how.

Jim Stapleton stapleton.41 at gmail.com
Mon May 26 17:02:35 UTC 2008


I'm trying to run ntpd to auto-update my computer's time (since I'm
not supposed to use ntpdate).

/etc/ntp.conf (I've tried without the restrict line):
========================================
server sushi.lyon.edu
restrict default ignore
driftfile /var/db/ntp.drift
========================================

I can get ntpdate to work fine with this command:
$ sudo ntpdate sushi.lyon.edu


I have tried this command (with and without the -g), with no success.
If I don't have an /etc/ntp.conf, it complains, and it stops
complaining when I put /etc/ntp.conf back where it belongs:
$ sudo  /usr/sbin/ntpd -q -g -f /var/db/ntpd.drift -l /var/log/ntpd.log

The contents of /var/log/ntpd.log:
========================================
26 May 11:46:43 ntpd[16353]: logging to file /var/log/ntpd.log
26 May 11:46:43 ntpd[16353]: ntpd 4.2.0-a Mon May 12 20:39:20 EDT 2008 (1)
26 May 11:46:43 ntpd[16353]: precision = 1.676 usec
26 May 11:46:43 ntpd[16353]: kernel time sync status 2040
26 May 11:47:04 ntpd[16353]: no reply; clock not set
========================================


To verify from the man page
  -q   update MY time, and exit
  -g   if the time difference is huge, just update, don't complain
  -f    drift file for heuristics so I don't have to update from the net.
  -l    log file


I've probably made a stupid mistake, but as far as I can gather from
the man pages, a few google searches, etc. This should work fine.

Any suggestions?
Thanks,
-Jim Stapleton


More information about the freebsd-questions mailing list