You are not logged in.

#1 2008-02-05 01:02:54

tntcoda
Member
Registered: 2007-07-24
Posts: 115

NTP Time Update Issue

Hi,

I installed Openntpd today, wanting to keep my system time up to date.

Heres the log file from several hours today:

Feb  4 20:22:56 tmain ntpd[26123]: adjusting local clock by 29.702893s
Feb  4 20:27:12 tmain ntpd[26123]: adjusting local clock by 29.672920s
Feb  4 20:28:12 tmain ntpd[26123]: adjusting local clock by 29.613593s
Feb  4 20:30:16 tmain ntpd[26123]: adjusting local clock by 29.540634s
Feb  4 20:34:01 tmain ntpd[26123]: adjusting local clock by 29.434171s
Feb  4 20:36:46 tmain ntpd[26123]: adjusting local clock by 29.359294s
Feb  4 20:40:33 tmain ntpd[26123]: adjusting local clock by 29.291625s
Feb  4 20:43:16 tmain ntpd[26123]: adjusting local clock by 29.239682s
Feb  4 20:44:34 tmain ntpd[26123]: adjusting local clock by 29.210540s
Feb  4 20:45:07 tmain ntpd[26123]: adjusting local clock by 29.090985s
Feb  4 20:49:28 tmain ntpd[26123]: adjusting local clock by 29.041360s
Feb  4 20:52:12 tmain ntpd[26123]: adjusting local clock by 28.982695s
Feb  4 20:53:16 tmain ntpd[26123]: adjusting local clock by 28.751467s
Feb  4 20:57:21 tmain ntpd[26123]: adjusting local clock by 28.774670s
Feb  4 21:00:48 tmain ntpd[26123]: adjusting local clock by 28.722078s
Feb  4 21:03:52 tmain ntpd[26123]: adjusting local clock by 28.610378s
Feb  4 21:06:53 tmain ntpd[26123]: adjusting local clock by 28.567314s
Feb  4 21:09:49 tmain ntpd[26123]: adjusting local clock by 28.461685s
Feb  4 21:12:41 tmain ntpd[26123]: adjusting local clock by 28.387137s
Feb  4 21:15:20 tmain ntpd[26123]: adjusting local clock by 28.294229s
Feb  4 21:18:32 tmain ntpd[26123]: adjusting local clock by 28.184862s
Feb  4 21:22:49 tmain ntpd[26123]: adjusting local clock by 28.078068s
Feb  4 21:26:37 tmain ntpd[26123]: adjusting local clock by 28.004485s
Feb  4 21:29:20 tmain ntpd[26123]: adjusting local clock by 27.903420s
Feb  4 21:32:28 tmain ntpd[26123]: adjusting local clock by 27.817704s
Feb  4 21:36:51 tmain ntpd[26123]: adjusting local clock by 27.708166s
Feb  4 21:41:08 tmain ntpd[26123]: adjusting local clock by 27.555689s
Feb  4 21:44:54 tmain ntpd[26123]: adjusting local clock by 27.537674s
Feb  4 21:49:12 tmain ntpd[26123]: adjusting local clock by 27.403506s
Feb  4 21:49:57 tmain ntpd[26123]: adjusting local clock by 27.288764s
Feb  4 21:54:02 tmain ntpd[26123]: adjusting local clock by 27.241040s
Feb  4 21:57:41 tmain ntpd[26123]: adjusting local clock by 27.166852s
Feb  4 21:58:24 tmain ntpd[26123]: adjusting local clock by 27.031212s
Feb  4 21:58:58 tmain ntpd[26123]: adjusting local clock by 27.028134s
Feb  4 22:03:14 tmain ntpd[26123]: adjusting local clock by 26.945336s
Feb  4 22:07:22 tmain ntpd[26123]: adjusting local clock by 26.868537s
Feb  4 22:10:43 tmain ntpd[26123]: adjusting local clock by 26.776496s
Feb  4 22:12:38 tmain ntpd[26123]: adjusting local clock by 26.684747s
Feb  4 22:16:48 tmain ntpd[26123]: adjusting local clock by 26.600848s
Feb  4 22:19:07 tmain ntpd[26123]: adjusting local clock by 26.509305s
Feb  4 22:22:18 tmain ntpd[26123]: adjusting local clock by 26.436993s
Feb  4 22:25:00 tmain ntpd[26123]: adjusting local clock by 26.325020s
Feb  4 22:29:13 tmain ntpd[26123]: adjusting local clock by 26.249509s
Feb  4 22:31:27 tmain ntpd[26123]: adjusting local clock by 26.168748s
Feb  4 22:34:52 tmain ntpd[26123]: adjusting local clock by 26.082247s
Feb  4 22:37:33 tmain ntpd[26123]: adjusting local clock by 26.007938s
Feb  4 22:41:52 tmain ntpd[26123]: adjusting local clock by 25.896919s
Feb  4 22:45:43 tmain ntpd[26123]: adjusting local clock by 25.790904s
Feb  4 22:49:12 tmain ntpd[26123]: adjusting local clock by 25.678081s
Feb  4 22:52:43 tmain ntpd[26123]: adjusting local clock by 25.598816s
Feb  4 22:56:36 tmain ntpd[26123]: adjusting local clock by 25.483674s
Feb  4 22:58:55 tmain ntpd[26123]: adjusting local clock by 25.374309s
Feb  4 23:02:48 tmain ntpd[26123]: adjusting local clock by 25.333132s
Feb  4 23:05:25 tmain ntpd[26123]: adjusting local clock by 25.226200s
Feb  4 23:09:11 tmain ntpd[26123]: adjusting local clock by 25.157832s
Feb  4 23:12:03 tmain ntpd[26123]: adjusting local clock by 25.029735s
Feb  4 23:15:54 tmain ntpd[26123]: adjusting local clock by 24.936798s
Feb  4 23:20:08 tmain ntpd[26123]: adjusting local clock by 24.809412s
Feb  4 23:23:49 tmain ntpd[26123]: adjusting local clock by 24.725221s
Feb  4 23:27:04 tmain ntpd[26123]: adjusting local clock by 24.645472s
Feb  4 23:29:13 tmain ntpd[26123]: adjusting local clock by 24.584328s
Feb  4 23:31:57 tmain ntpd[26123]: adjusting local clock by 24.497465s
Feb  4 23:35:37 tmain ntpd[26123]: adjusting local clock by 24.404453s
Feb  4 23:39:25 tmain ntpd[26123]: adjusting local clock by 24.320463s
Feb  4 23:41:24 tmain ntpd[26123]: adjusting local clock by 24.221673s
Feb  4 23:44:43 tmain ntpd[26123]: adjusting local clock by 24.154211s
Feb  4 23:47:27 tmain ntpd[26123]: adjusting local clock by 24.044906s
Feb  4 23:51:05 tmain ntpd[26123]: adjusting local clock by 23.955594s
Feb  4 23:55:26 tmain ntpd[26123]: adjusting local clock by 23.858674s
Feb  4 23:58:01 tmain ntpd[26123]: adjusting local clock by 23.769042s
Feb  5 00:01:17 tmain ntpd[26123]: adjusting local clock by 23.703575s
Feb  5 00:04:35 tmain ntpd[26123]: adjusting local clock by 23.598777s
Feb  5 00:08:53 tmain ntpd[26123]: adjusting local clock by 23.483375s
Feb  5 00:12:06 tmain ntpd[26123]: adjusting local clock by 23.353024s
Feb  5 00:15:55 tmain ntpd[26123]: adjusting local clock by 23.272803s
Feb  5 00:19:03 tmain ntpd[26123]: adjusting local clock by 23.207578s
Feb  5 00:23:25 tmain ntpd[26123]: adjusting local clock by 23.051436s
Feb  5 00:27:28 tmain ntpd[26123]: adjusting local clock by 22.947189s
Feb  5 00:29:48 tmain ntpd[26123]: adjusting local clock by 22.871296s
Feb  5 00:33:07 tmain ntpd[26123]: adjusting local clock by 22.779716s
Feb  5 00:36:01 tmain ntpd[26123]: adjusting local clock by 22.675202s
Feb  5 00:40:12 tmain ntpd[26123]: adjusting local clock by 22.567836s
Feb  5 00:43:42 tmain ntpd[26123]: adjusting local clock by 22.493091s
Feb  5 00:47:58 tmain ntpd[26123]: adjusting local clock by 22.397098s
Feb  5 00:51:40 tmain ntpd[26123]: adjusting local clock by 22.325535s

Should i be concerned that it seems ~ 20 seconds out every 10mins or so, i wouldn't have thought it would need updating by that much at such regular intervals. Any chance it isn't saving the time correctly or something :S

Thanks for any help,
Jack

Offline

#2 2008-02-05 23:16:42

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: NTP Time Update Issue

Yeah, something is up.  You don't happen to have ntpd running too?  Or maybe you time  is quite off and it is correcting on some sort of tapered scheme.

Offline

#3 2008-02-06 01:36:39

tntcoda
Member
Registered: 2007-07-24
Posts: 115

Re: NTP Time Update Issue

Thanks, I don't have ntpd running no, but i have noticed that now the gap has decreased from 30seconds to around 0.1-0.3 every update cycle, which i guess is acceptable.

eg
Feb  5 13:58:43 tmain ntpd[26123]: adjusting local clock by 0.356343s
Feb  5 14:00:50 tmain ntpd[26123]: adjusting local clock by 0.282871s
Feb  5 14:03:45 tmain ntpd[26123]: adjusting local clock by 0.192887s

No idea why it gradually decreased down to that amount though :S

Offline

#4 2008-02-06 06:56:27

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: NTP Time Update Issue

Just use ntp. openntp is not as good.

Offline

#5 2008-02-06 09:11:36

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: NTP Time Update Issue

The behaviour is perfectly right. It adjusts the time gradually. You are not affected by the debian bug linked in the link above, where the offset grows, in your case it decreases!
What is misleading is the log message "adjusting local clock by": what it should say is "local clock should be adjusted by x, I will do it bit by bit", "I am adjusting it, and now is a bit better", finally it goes below the threshold and stops adjusting smile

Concerning the difference between openntpd and ntp, one should consider also that ntp is much more difficult to setup and its alleged ability of fixing the rate of the clock is more a promise than a reality (I tried both and actually it does exactly the same things which openntpd does).

Last edited by patroclo7 (2008-02-06 09:17:29)


Mortuus in anima, curam gero cutis

Offline

#6 2008-02-06 11:36:38

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: NTP Time Update Issue

For ntp setup, see wiki.

ntp uses /var/lib/ntp/ntp.drift - never heard of an openntp equivalent.

Offline

#7 2008-02-06 11:43:33

tntcoda
Member
Registered: 2007-07-24
Posts: 115

Re: NTP Time Update Issue

Ok thanks for all the help guys smile Might as well stick with Openntpd if its doing the job correctly smile

Offline

#8 2008-02-06 12:55:16

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: NTP Time Update Issue

brebs wrote:

Just use ntp. openntp is not as good.

Well, that frequency adjusting feature was apparently added a while ago (June 2006) :
http://www.openbsd.org/cgi-bin/cvsweb/s … web-markup

But :
OpenNTPD 4.2 released Nov 1, 2007.
Portable OpenNTPD 3.9p1 released May 14, 2006.

So it was apparently added just after the last portable release. Probably that point is still valid today.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2008-02-07 13:36:32

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: NTP Time Update Issue

The following patches added the frequency adjusting feature to the portable version of openntpd:
http://www.zip.com.au/~dtucker/openntpd/patches/
However, these are pacthes for a previous version of portable openntpd.
The PKGBUILD for openntpd in the community  repo probably aimed to apply this patch, because it is included in the source array, but not included in the tarball and not applied in build.
So, I have updated the patch to openntpd-3.9p1 and it seems to work fine!

I have posted a bug report for openntpd where I propose: 1) to apply this patch by default; 2) to run openntpd as a specific openntpd user  and not as nobody as now; 3) some other minor fixes for the openntpd PKGBUILD.

The bug report is here: http://bugs.archlinux.org/task/9485. It includes the tarball with the PKGBUILD, the frequency adjusting patch and an openntpd.install to create the user. Feel free to try it and report any issue or comment here or in the bug comments.


Mortuus in anima, curam gero cutis

Offline

#10 2008-02-08 09:22:59

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: NTP Time Update Issue

Ok, the TU accepted and improved the modifications, so now openntpd in community should adjust the frequency (the visible effect should be that after a certain period of use it should need less often to adjust directly the time of the clock).


Mortuus in anima, curam gero cutis

Offline

#11 2008-02-08 13:51:38

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: NTP Time Update Issue

patroclo7 wrote:

Ok, the TU accepted and improved the modifications, so now openntpd in community should adjust the frequency (the visible effect should be that after a certain period of use it should need less often to adjust directly the time of the clock).

Way to go, patroclo.
This serves as a reminder and a great example for the rest of us to use the BUG report tab for bugs/feature requests.
big_smile

Offline

Board footer

Powered by FluxBB