sync openBSD 5.3 NTPD on DNS server

Time is incorrect on linux servers.  The /etc/ntpd.conf consist the following:

# cat /etc/ntpd.conf
# $OpenBSD: ntpd.conf,v 1.11 2009/05/18 16:13:48 stevesk Exp $
# sample ntpd configuration file, see ntpd.conf(5)

# Addresses to listen on (ntpd does not listen by default)
#listen on *

# sync to a single server
server 207.14.*.* weight 5

# use a random selection of NTP Pool Time Servers
# see

# use a specific local timedelta sensor (radio clock, etc)
#sensor nmea0

# use all detected timedelta sensors
#sensor *

Open in new window

The 207 address is our public NTP server.

NTPD is not currently running.
If I run sudo /etc/rc.d/ntpd start, the message appears:
# sudo /etc/rc.d/ntpd start
/etc/rc.d/ntpd: no start without -f, ntpd_flags=NO
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The -f command line option refers to the drift file, where NTP stores the latest correction setting. NTP asks for the commend line option, which seems to be misleading here. The setting could be included into the ntp.conf file: just include a driftfile directive into your ntp.con file, i.e. (from one of my systems):
driftfile /var/lib/ntp/drift/ntp.drift 

Open in new window

xstream62Author Commented:
I do not have a directory /var/lib

Side note: I now have NTPD running.  I had to edit /etc/rc.local and add ntpd_flags= to the file. Where as before it only read ntpd

However, the time still is not accurate.
That line is only an example ... point it to any location where ntd could write and read a file,
driftfile /tmp/ntp.drift 

Open in new window

would do as well.

The file would be extremely small (less than 1 byte) and contain only one ascii representation of a numeric value.


Is ntpd really running (ps -ef | grep ntpd) ?
Please post the output of ntpq -p ?
Pleare post some ntpd logfile, too. There are several locations to search for that log, on SUS it's in /var/log
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

xstream62Author Commented:
ps -ef | grep ntpd returned error of unknown option --f.
ps -e | grep ntpd returned nothing.
ps -aux returns
 _ntp      2610  0.0  0.1   680   968 ??  I      2:37PM    0:00.00 ntpd: dns engine (ntpd)
 _ntp      6499  0.0  0.1   548  1020 ??  I      2:37PM    0:00.04 ntpd: ntp engine (ntpd)

Not sure what ntpq is because it is using ntpd.
# ntpq -p
ksh: ntpq: not found

# ntpd ?
usage: ntpd [-dnSsv] [-f file]

daemon log file says
Oct  6 15:02:12 ns2 ntpd[27740]: adjusting local clock by -4090.464835s
  No longer in /var/log has anything relating to ntpd

# date
Tue Oct  6 15:02:43 GMT 2015

do I include driftfile /tmp/ntp.drift in the /etc/ntpd.conf file?

Thank you
Hmmm - I'm a bit puzzled about ntpq ... this is the status query program for NTP. Maybe it's not in the path. Should be in the same directory as ntpd.

The log tells that ntpd does something - it seems to do adjustment. ntpq would have told something about ntp status (reached server, communication quality, etc.).

And yes, you should include
driftfile /tmp/ntp.drift

Open in new window

into /etc/ntp.conf. BTW: My article on NTP would give you additional details about ntp.conf.

Having a closer look at your ntp.conf now, it seems to be a bit unusual in the keywords. Please check the man page mentioned there for correct spelling of the keywords.

And I would recommend to use more than one of the servers from ... as outlined in the article.
xstream62Author Commented:
Great article but it seems it doesn't relate to the distro I am using (OpenBSD 5.3).  None of the commands work.  ntpq, ntpdate , and including driftfile in the /etc/ntpd.conf causes the service to not start.  MAN ntpd.conf doesn't have a driftfile option only listen, sensor, server, and servers.
xstream62Author Commented:
I was able to update the time by restarting the server then going into the BIOS.  This fixes one server which was off by 8 hours.  

Though two other servers are off by 1 hour.  I would want to prevent a restart of the remaining two servers if possible.
Ok - NTP (maybe your distribution, too) is programmed not to correct the time on startup if it's too far from the actual time from the time sources. This is to prevent stepping the system around following faulty sources.

Try to set the system time with on-board means of linux (date command). That usually would adjust the BIOS clock, too. Restart NTP afterwards.

Since your NTP asks for the -f parameter, you might also give the driftfile directive that way (ntp.conf would be easier, if supported). Try man ntpd for the correct syntax.

BTW: Looks like you have some weird distribution ... I think most of them carry the official NTP client ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xstream62Author Commented:
I might of been mistaken of the other two servers...they were already the correct time.  So the one server time was fixed through the BIOS.  I'm leaving the settings as is for now.  

Thanks for the assistance you provided.  :)
xstream62Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.