Re: ntpd doesn't sync clock reliably anymore on 4.2

2007-11-26 Thread Tasmanian Devil
 In fact the clock of that machine isn't that bad

The clock seems to be worse than I thought. I'll replace the crystal
oscillator on that mainboard and see if that helps.

Sorry for the noise!

Tas.



ntpd doesn't sync clock reliably anymore on 4.2

2007-11-25 Thread Tasmanian Devil
Hello, list!

I've a problem with the clock of an old AMD K6-2 machine (dmesg below)
since the 4.2-release upgrade. The clock worked fine before with 4.1.
Because of this problem I upgraded to 4.2-current, but that didn't
help.

192.168.0.21 and 192.168.0.22 are local routers, ntpd can sync their
clock without problems, and other local machines sync fine using them.
I tried also with pool.ntp.org on the problematic machine, with same
results. I see this in the log after removing /var/db/ntpd.drift and
setting the clock correctly via BIOS menu while rebooting:

23 04:13:49 darkone ntpd[15666]: ntp engine ready
Nov 23 04:14:08 darkone ntpd[15666]: peer 192.168.0.22 now valid
Nov 23 04:14:13 darkone ntpd[15666]: peer 192.168.0.21 now valid
Nov 23 04:15:06 darkone ntpd[19117]: adjusting local clock by 0.290352s
Nov 23 04:18:44 darkone ntpd[19117]: adjusting local clock by 0.175437s
Nov 23 04:20:19 darkone ntpd[19117]: adjusting local clock by 0.115706s
Nov 23 04:26:40 darkone ntpd[15666]: clock is now synced
Nov 23 04:54:07 darkone ntpd[19117]: adjusting clock frequency by
-60.029035 to -60.029035ppm
Nov 23 05:11:20 darkone ntpd[19117]: adjusting clock frequency by
-4.753364 to -64.782399ppm
Nov 23 05:38:03 darkone ntpd[19117]: adjusting clock frequency by
4.342937 to -60.439462ppm
Nov 23 15:37:50 darkone ntpd[19117]: adjusting clock frequency by
0.427949 to -60.011513ppm
Nov 23 18:24:32 darkone ntpd[15666]: reply from 192.168.0.22: negative
delay -0.012752s, next query 3082s
Nov 23 18:24:48 darkone ntpd[15666]: reply from 192.168.0.21: negative
delay -0.005866s, next query 3144s
Nov 23 19:45:35 darkone ntpd[15666]: reply from 192.168.0.21: negative
delay -0.019764s, next query 3014s
Nov 23 20:16:04 darkone ntpd[15666]: reply from 192.168.0.22: negative
delay -0.023478s, next query 3113s
Nov 23 20:36:04 darkone ntpd[19117]: adjusting local clock by -61.662375s
Nov 23 21:07:57 darkone ntpd[19117]: adjusting local clock by -261.236635s
Nov 23 21:07:57 darkone ntpd[15666]: clock is now unsynced
Nov 23 21:11:08 darkone ntpd[19117]: adjusting local clock by -407.747600s
Nov 23 21:14:48 darkone ntpd[19117]: adjusting local clock by -406.641659s
Nov 23 21:18:04 darkone ntpd[19117]: adjusting local clock by -405.661457s
Nov 23 21:20:12 darkone ntpd[19117]: adjusting local clock by -405.015764s
Nov 23 21:22:51 darkone ntpd[19117]: adjusting local clock by -404.219649s
Nov 23 21:25:01 darkone ntpd[19117]: adjusting local clock by -403.563826s
Nov 23 21:27:38 darkone ntpd[19117]: adjusting local clock by -402.774064s
Nov 23 21:31:30 darkone ntpd[19117]: adjusting local clock by -401.608460s
Nov 23 21:34:06 darkone ntpd[19117]: adjusting local clock by -400.822696s
Nov 23 21:36:48 darkone ntpd[19117]: adjusting local clock by -400.011870s
Nov 23 21:38:25 darkone ntpd[19117]: adjusting local clock by -399.520853s

...and so on. Sometimes ntpd can't sync the clock even if the clock is
set correctly via BIOS menu and with /var/db/ntpd.drift removed before
rebooting, but if I'm lucky, it works for maybe a day. Unfortunately
there's no second time source and the BIOS has no ACPI:

$ sysctl kern.timecounter
kern.timecounter.tick=1
kern.timecounter.timestepwarnings=0
kern.timecounter.hardware=i8254
kern.timecounter.choice=i8254(0) dummy(-100)

In fact the clock of that machine isn't that bad, it might be off a
few seconds or even a minute per day without ntpd running, but not as
much as with ntpd running. Is this simply a problem with broken
hardware, or is it possible to fix this with the existing clock and
software somehow?

Thank you for your help!

Tas.


OpenBSD 4.2-current (GENERIC) #548: Sat Nov 17 22:47:27 MST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD-K6(tm) 3D processor (AuthenticAMD 586-class) 502 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX
real mem  = 536440832 (511MB)
avail mem = 510857216 (487MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 08/05/99, BIOS32 rev. 0 @
0xfb390, SMBIOS rev. 2.1 @ 0xf0800 (29 entries)
bios0: vendor Award Software International, Inc. version 4.51 PG date 08/05/99
apm0 at bios0: Power Management spec V1.2 (slowidle)
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev 2.1 @ 0xf/0xb80c
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdde0/112 (5 entries)
pcibios0: PCI Exclusive IRQs: 7 9 10 11
pcibios0: PCI Interrupt Router at 000:07:0 (VIA VT82C586 ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 VIA VT82C598 PCI rev 0x04
ppb0 at pci0 dev 1 function 0 VIA VT82C598 AGP rev 0x00
pci1 at ppb0 bus 1
pcib0 at pci0 dev 7 function 0 VIA VT82C586 ISA rev 0x47
pciide0 at pci0 dev 7 function 1 VIA VT82C571 IDE rev 0x06: ATA33,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: Maxtor 6Y120L0
wd0: 16-sector PIO, LBA, 117246MB, 240121728 sectors