From: root on 2 Nov 2009 07:57 root <NoEMail(a)home.org> wrote: > Giovanni <lsodgf0(a)home.net.it> wrote: >> >> I'm not sure, but I think you have to comment the keys ID and the >> multicast ditective. ntptrace should give the hierarchy of used ntp >> servers. >> >> # root(a)monica:~ > ntptrace >> localhost: stratum 3, offset -0.001629, synch distance 0.073363 >> milena.home.net.it: stratum 2, offset -0.000408, synch \ >> distance 0.035561 >> ntp1.inrim.it: stratum 1, offset -0.000033, synch \ >> distance 0.000138, refid 'UTCI' >> # root(a)monica:~ > >> >> Ciao >> Giovanni > > I have tried commenting out the keys stuff, but the > ntptrace command, without specifying a server, never > goes anywhere. > > I have been running a sequence of these steps: > source /etc/rc.d/rc.ntpd stop > modify /etc/ntp.conf > source /etc/rc.d/rc.ntpd start > ntptrace > > Repeat over and over. So far no luck. > > I'll try your conf file as is. OK. No change with your config file, as is. I have no firewall stuff to block the port, and I think the fact that ntpdate can talk to the servers that communication is possible.
From: Thomas Ronayne on 2 Nov 2009 08:40 root wrote: > How long does it take for the daemon to fix the > clock drift? The daemon has been running for > 9 hours and my clock is off by 6 minutes. Without > ntpd my clock would have been off by roughly the > same amount. > Try this: in //etc/ntp.conf/ change the servers section to look like this (assuming you're in the US, otherwise, change the country code as appropriate) server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 #server pool.ntp.org server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org (leave the local clock and fudge alone, they're there for local sync when the network goes away for whatever reason) What we're doing is giving the daemon three external time servers to "vote" for the "best" time source. and edit //etc/rc.d/rc.ntpd/ adding # Start ntpd: ntpd_start() { *# We add a log for NTP; it gets wiped out on every daemon start* * >/tmp/ntp.log * CMDLINE="/usr/sbin/ntpd -g" echo -n "Starting NTP daemon: $CMDLINE" $CMDLINE -p /var/run/ntpd.pid *-l /tmp/ntp.log * echo } (this gives you log entries in //tmp/ntp.log/) Then, stop and restart NTP (//etc/rc.d/rc.ntpd stop/, wait a few seconds, //etc/rc.d/rc.ntpd start/) After a minute or so your //tmp/ntp.log/ will look similar to this cat /tmp/ntp.log 2 Nov 08:18:03 ntpd[3007]: logging to file /tmp/ntp.log 2 Nov 08:18:03 ntpd[3007]: precision = 1.000 usec 2 Nov 08:18:03 ntpd[3007]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 2 Nov 08:18:03 ntpd[3007]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled 2 Nov 08:18:03 ntpd[3007]: Listening on interface #1 lo, 127.0.0.1#123 Enabled 2 Nov 08:18:03 ntpd[3007]: Listening on interface #2 eth0, 192.168.1.30#123 Enabled 2 Nov 08:18:03 ntpd[3007]: Listening on interface #3 ppp0, 69.54.207.108#123 Enabled 2 Nov 08:18:03 ntpd[3007]: kernel time sync status 0040 2 Nov 08:18:03 ntpd[3007]: frequency initialized 0.000 PPM from /etc/ntp/drift 2 Nov 08:21:18 ntpd[3007]: synchronized to LOCAL(0), stratum 10 2 Nov 08:21:18 ntpd[3007]: kernel time sync status change 0001 2 Nov 08:22:24 ntpd[3007]: synchronized to 65.255.217.202, stratum 3 After a few minutes, you ought to see something similar to this by executing /nptq -p/ remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) .LOCL. 10 l 34 64 377 0.000 0.000 0.001 +www.broadbandja 69.63.177.217 3 u 34 64 377 236.961 16.837 29.095 +router-gw1.net. 192.43.244.18 2 u 34 64 377 286.630 66.475 34.978 *198.186.191.229 64.147.116.229 2 u 32 64 377 220.962 22.407 12.225 The asterisk indicates the server you're synchronized to, the plus signs indicate candidates. By defining three external servers (in //etc/ntp.conf/), we're giving the daemon a range of servers so it can select the best one for synchronization (least delay time, least jitter). Over time, the servers shown by /ntpq -p/ will change as other, "better" servers become available (the log will show when this happens). If you don't get synchronized in, oh, fifteen minutes or so you clock may be too far off for NTP to adjust it; NTP won't slew a clock six minutes for example. So, stop the daemon, execute /ntpdate/ using one of the pool servers you see from /ntpq -p/ then start the daemon again. It may take some time (hours) for //etc/ntp/drift/ to change in any event. Hope this helps some.
From: Thomas Ronayne on 2 Nov 2009 08:46 Thomas Ronayne wrote: > root wrote: >> How long does it take for the daemon to fix the >> clock drift? The daemon has been running for >> 9 hours and my clock is off by 6 minutes. Without >> ntpd my clock would have been off by roughly the >> same amount. >> > > # Start ntpd: > ntpd_start() { > *# We add a log for NTP; it gets wiped out on every daemon start* > * >/tmp/ntp.log * > CMDLINE="/usr/sbin/ntpd -g" > echo -n "Starting NTP daemon: $CMDLINE" > $CMDLINE -p /var/run/ntpd.pid *-l /tmp/ntp.log * > echo > } > (this gives you log entries in //tmp/ntp.log/) > > Well, that got pretty messy... should look like this # Start ntpd: ntpd_start() { # We add a log for NTP; it gets wiped out on every daemon start >/tmp/ntp.log CMDLINE="/usr/sbin/ntpd -g" echo -n "Starting NTP daemon: $CMDLINE" $CMDLINE -p /var/run/ntpd.pid -l /tmp/ntp.log echo }
From: root on 2 Nov 2009 09:00 Thomas Ronayne <trona(a)ameritech.net> wrote: > Hope this helps some. I think it was a big help. I get this in the log file after re-starting ntpd: 2 Nov 05:51:24 ntpd[3077]: logging to file /tmp/ntp.log 2 Nov 05:51:24 ntpd[3077]: precision = 4000.000 usec 2 Nov 05:51:24 ntpd[3077]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 2 Nov 05:51:24 ntpd[3077]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled 2 Nov 05:51:24 ntpd[3077]: Listening on interface #1 lo, 127.0.0.1#123 Enabled 2 Nov 05:51:24 ntpd[3077]: Listening on interface #2 eth0, 10.0.0.3#123 Enabled 2 Nov 05:51:24 ntpd[3077]: kernel time sync status 0040 2 Nov 05:51:25 ntpd[3077]: frequency initialized 1.211 PPM from /etc/ntp/drift 2 Nov 05:54:41 ntpd[3077]: synchronized to LOCAL(0), stratum 10 2 Nov 05:54:41 ntpd[3077]: kernel time sync status change 0001 and I get this for ntpq -p: remote refid st t when poll reach delay offset jitter ============================================================================== *LOCAL(0) .LOCL. 10 l 46 64 77 0.000 0.000 3.906 clock.team-cymr 192.168.0.16 2 u 47 64 77 67.367 27839.7 2012.35 lime7.adamantsy 208.75.88.4 3 u 41 64 77 48.759 27902.8 2043.38 rrcs-64-183-56- .GPS. 1 u 50 64 77 23.623 27810.4 1974.96 So it seems that it may be seeing 3 servers. I'll let it run for a few hours to see if the drift entry changes. Thanks a whole lot.
From: root on 2 Nov 2009 09:01 Thomas Ronayne <trona(a)ameritech.net> wrote: > Thomas Ronayne wrote: >> root wrote: >>> How long does it take for the daemon to fix the >>> clock drift? The daemon has been running for >>> 9 hours and my clock is off by 6 minutes. Without >>> ntpd my clock would have been off by roughly the >>> same amount. >>> >> >> # Start ntpd: >> ntpd_start() { >> *# We add a log for NTP; it gets wiped out on every daemon start* >> * >/tmp/ntp.log * >> CMDLINE="/usr/sbin/ntpd -g" >> echo -n "Starting NTP daemon: $CMDLINE" >> $CMDLINE -p /var/run/ntpd.pid *-l /tmp/ntp.log * >> echo >> } >> (this gives you log entries in //tmp/ntp.log/) >> >> > Well, that got pretty messy... should look like this > # Start ntpd: > ntpd_start() { > # We add a log for NTP; it gets wiped out on every daemon start > >/tmp/ntp.log > CMDLINE="/usr/sbin/ntpd -g" > echo -n "Starting NTP daemon: $CMDLINE" > $CMDLINE -p /var/run/ntpd.pid -l /tmp/ntp.log > echo > } > Thanks again, I got it from your first post.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: no sound on my hp dv7 notebook using alsa Next: ntpd still not working |