# Question on to openntpd, ntp-client service etc [solved]

## tld

I was looking into switching from ntp to openntpd and several aspects of it have me a bit confused.

My current setup is that I have my MythTV backend serving as an ntp server for my other computers.  In addition to that I have the ntp-client service enabled on my mythfrontend.  The latter was because, as far as I always thought, ntpd wasn't able to make major changes to the time if that was needed.  After running into an issue where my CMOS time got screwed up in a power outage I enabled that in case the time needed a major correction at boot time.

I won't even get into what a buggy nightmare the whole ntp-client part, including the ntp projects switch from ntpdate to sntp (with it's insanely confusing command line options which appear to have changed over time):

https://forums.gentoo.org/viewtopic-t-987724.html

...that still fails on me most of the time even though I know the network is up when it starts...no clue why.

From what I'm reading, it doesn't sound like openntpd has any such concept at all.  Is that correct, and if so, is it capable of making significant corrections to the time if needed?

The whole thing has me a little confused.  Thanks in advance.

TomLast edited by tld on Sun Jan 11, 2015 3:05 pm; edited 1 time in total

----------

## Ant P.

openntpd only corrects time differences above 3 minutes when asked to; smaller than that and you'll have to wait or do it manually. There's no mess of different programs though, one binary does both client/server.

----------

## tld

Thanks!  I was just reading that and realized that the "-s" option to it's daemon serves the same purpose as what I'm attempting to do on my mythfrontend server...that is to set the time on startup...only without using the ntp-client service at all.

Another thing that confused me was as to how you would set the time manually from the command line.  Apparently that can be done using the daemon program as:

```
ntpd -s -d
```

...where -d does not daemonize the program.

Thanks again.

----------

## Ant P.

If you want to do that just use "busybox ntpd -q".

----------

## tld

Wow...the exercise of switching to openntpd may have finally explained to me why sntp failed on me so frequently with my old setup:  The failures were occurring when I was rebooting both my mythfrontend and mythbackend server, where the backend was being used as the ntp server for the frontend.

The sntp program simply never gave me any meaningful error when it failed, but the openntpd daemon clearly told me that the backend was "not synced".  After rebooting the server being used as the ntp server, it can apparently be as long as five minutes before it considers itself synced.  Prior to that, attempting to sync to will always fail.

My original goal was to make sure that my front end could correct, for example, a corrupted time after a power outage.  Since openntpd always uses the servers in /etc/ntpd.conf for either the initial time set or the running daemon, the only way to reliably do that would probably require that it not rely on my local ntp server, and instead be configured to use external ones.

----------

