Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question on to openntpd, ntp-client service etc [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1374

PostPosted: Sat Jan 10, 2015 7:06 pm    Post subject: Question on to openntpd, ntp-client service etc [solved] Reply with quote

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.

Tom


Last edited by tld on Sun Jan 11, 2015 3:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Sat Jan 10, 2015 11:23 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1374

PostPosted: Sun Jan 11, 2015 3:04 pm    Post subject: Reply with quote

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:

Code:
ntpd -s -d


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

Thanks again.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Sun Jan 11, 2015 4:55 pm    Post subject: Reply with quote

If you want to do that just use "busybox ntpd -q".
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1374

PostPosted: Sun Jan 11, 2015 5:01 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum