You are not logged in.

#1 2012-10-07 18:11:57

weirddan455
Member
Registered: 2012-04-15
Posts: 209

[SOLVED] NTPD Isn't Syncing the Hardware Clock

This is a fresh install with the new install disc.  I'm dual booting with Windows 7 and I followed the advice in the beginner's guide to set the hardware clock to UTC and then modify the registry in Windows so that it can also use UTC time.  Well, before I modified the registry, Windows would sync the time to the internet every week or so and also sync the hardware clock every time I shut down.  After I modified the registry, Windows leaves the hardware clock completely alone which is expected behavior with the "hack" I did and would be fine EXCEPT:

Now nothing is auto syncing the hardware clock leaving it free to get as out of sync as it wants.  I'm running NTPD as a daemon in /etc/rc.conf and according to the wiki here:

https://wiki.archlinux.org/index.php/Nt … d_sysvinit

It should be syncing the hardware clock every 11 minutes.  Only it's not touching it at all.  I can see NTPD running as soon as I boot the computer by running date (shows the system time, not the hardware time) as soon as I log in it shows the out of sync time then a couple seconds later, it connects to the server and date shows the correct time.  But when I look at my hardware clock by running "hwclock --show" it still shows the out of sync time I started with.  I was able to set the hardware clock manually by running "hwclock -w" and that worked fine but I'm really looking for a way to do this all automatically.

I'm kind of thinking that wiki is wrong.  Also I haven't been able to try doing it the systemd way because if I type systemctl I just get

"Failed to get D-Bus connection: No connection to service manager."

Last edited by weirddan455 (2012-10-09 22:22:19)

Offline

#2 2012-10-07 18:16:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

can you post the output of ntpdc -c sysinfo   ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2012-10-07 18:29:50

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

system peer:          205-196-146-72.5ninesdata.com
system peer mode:     client
leap indicator:       00
stratum:              3
precision:            -23
root distance:        0.08994 s
root dispersion:      0.24413 s
reference ID:         [205.196.146.72]
reference time:       d41c4828.5bd687a2  Sun, Oct  7 2012 13:27:52.358
system flags:         auth monitor ntp kernel stats 
jitter:               0.010178 s
stability:            0.000 ppm
broadcastdelay:       0.000000 s
authdelay:            0.000000 s

Offline

#4 2012-10-07 20:04:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

Okay, That looks pretty good.  I wanted to double check the system flags and that the stratum is reasonable.  If the stratum (a measure of the quality of your server) is too high, the system might not trust the time to the point where it will use it to set the HW clock.  Doesn't seem to be the problem.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2012-10-08 13:39:46

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

I've been noticing this as well, only because I don't boot into Windows all that much, I've been too lazy to investigate it. But I find my system behaving the same as weirddan455's. Here's my info:

$ ntpdc -c sysinfo
system peer:          name1.glorb.com
system peer mode:     client
leap indicator:       00
stratum:              3
precision:            -23
root distance:        0.06575 s
root dispersion:      0.07077 s
reference ID:         [204.235.61.9]
reference time:       d41d52fb.8e4b4de1  Mon, Oct  8 2012  9:26:19.555
system flags:         auth monitor ntp kernel stats 
jitter:               0.003433 s
stability:            0.000 ppm
broadcastdelay:       0.000000 s
authdelay:            0.000000 s
$ hwclock --show
Mon 08 Oct 2012 05:36:29 AM EDT  -0.141239 seconds
$ sudo hwclock -w
$ hwclock --show
Mon 08 Oct 2012 09:36:44 AM EDT  -0.188108 seconds

Offline

#6 2012-10-08 20:35:48

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

Notice that the kernel will not sync the clock if it is more than 15 minutes wrong, you might want to force-set it once manually.

Offline

#7 2012-10-09 22:21:55

weirddan455
Member
Registered: 2012-04-15
Posts: 209

Re: [SOLVED] NTPD Isn't Syncing the Hardware Clock

tomegun wrote:

Notice that the kernel will not sync the clock if it is more than 15 minutes wrong, you might want to force-set it once manually.

Looks like you were right here.  I just intentionally set the clock 2 or 3 minutes slow in the BIOS.  As soon as I booted into Linux, the system clock got set back to the correct time with NTP.  Then, it took about 20 minutes or so but it did sync up the hardware clock.  I just had the hardware clock too far off before it seems.

Offline

Board footer

Powered by FluxBB