You are not logged in.

#1 2009-06-12 13:50:25

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

[solved]A bit confused about openntpd

I installed openntpd to keep my system clock synchronized back when I installed Arch. I added it to my daemons array as suggested in the wiki (@openntpd) and haven't given it much thought since then. I only recently noticed that my system time was about 5 minutes ahead of the rest of the world (which worked out in a way as all my clocks are set to my computer, which explains why it's been so long since I missed a bus or showed up 5 minutes late for something).

I've just run "ntpd -sd" and it set the clock right immediately (I'm not worried about log consistency right now), which makes me wonder what the point of having openntpd in the daemons array is if it doesn't seem to do anything. It's been in there for nearly a year and yet my time still shifted. Am I doing something wrong? The only lines in the daemons log related to ntpd are ones showing when it terminated.

Also, is there a way to run ntpd so it just sets the time and exits instead of hanging around in daemon mode? It seems that it constantly checks with the server pool for minor time shifts.

[edit]
I probably should have done this first, but I'm searching the forum right now for related issues. So far I've deleted /var/lib/hwclock/ajdtime as suggested here because the first number was > 4.5. I don't know if that has any affect but somehow I would still expect openntpd to set the correct time (which it did when run in a terminal).
[/edit]

Last edited by Xyne (2009-06-12 14:55:32)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2009-06-12 14:10:21

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: [solved]A bit confused about openntpd

According to the wiki, there can be problems with backgrounding openntpd during startup. If you aren't already, try starting it in the foreground.

Offline

#3 2009-06-12 14:22:08

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]A bit confused about openntpd

Do you happen to know why that creates a problem? Also, I realize that I should have tried that before posting (culpa mea).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2009-06-12 14:38:17

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [solved]A bit confused about openntpd

Had the same problem and solved by removing the @


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#5 2009-06-12 14:56:20

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]A bit confused about openntpd

Unbackgrounding it seems to solve the problem but I still find it strange that that was necessary.

Thanks for the replies and sorry about not noticing that part in the wiki.

I'd still like to know if there's a way to make openntpd set the clock and exit from the command line.

Last edited by Xyne (2009-06-12 14:57:56)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2009-06-12 15:54:00

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [solved]A bit confused about openntpd

Xyne wrote:

I'd still like to know if there's a way to make openntpd set the clock and exit from the command line.

If I remember correctly, I was using ntpdate for that task on my Gentoo box.


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#7 2009-06-12 15:57:39

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]A bit confused about openntpd

Thanks.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2009-06-12 17:51:59

alienman
Member
From: Mexico
Registered: 2008-07-08
Posts: 106

Re: [solved]A bit confused about openntpd

Maybe I am wrong but it look like you thouht that openntp was running as a daemon and retrieving info from servers. I think that it only does it once. Some problems can arise if there is no networking at the time openntp is launched. If you use Networkmanager tou can see my post http://bbs.archlinux.org/viewtopic.php?id=73380

If you are using something else like wicd, ntcfg, etc. You could research information on how to make scripts for them or monitoring your ip could work also in a script launched by a cron or similar daemon.


ISC - Ignacio Marmolejo
ArchLinux & GNOME User.

Offline

#9 2009-06-12 19:39:56

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved]A bit confused about openntpd

When run in a terminal with "-sd", it remains open and continuously prints out replies, which is what I was referring to (maybe it stops after a while but I haven't tried leaving it open long enough to find out). I wanted to know if it were possible to run it once to set the time and then exit. It seems that ntpdate does this, as arkham replied above. I thought it would be possible to do that with ntpd. I've been running it in daemon mode since I first installed and I know that it doesn't constantly ping different servers (I have the switch where I can see it so I know when the network is being used).

I don't use network manager but thanks for the reply. At the moment it seems to be enough that I've unbackgrounded openntpd. The only problem with that is that it adds a few extra seconds to the boot process which is annoying (normally it flies through my daemons, now it waits on that).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB