Prev: Driver for Buffalo LPC PCM CLX
Next: Apple iPod
From: Logical on 13 Jan 2006 23:50 Hi Been fiddling with ntpd on my slackware 10.0 box for a while now but it constantly seems to be freezing and allowing the time to drift significantly. root[at]mythtv:/home/mythtv# uname -a Linux mythtv 2.6.12.3-mythtv #3 Tue Jul 26 23:03:30 EST 2005 i686 unknown unknown GNU/Linux --- root[at]mythtv:/home/mythtv# cat /etc/ntp.conf # Sample /etc/ntp.conf: Configuration file for ntpd. # logfile /var/log/ntpd.log server ntp.iinet.net.au server ntp.nsw.westnet.com.au server time.deakin.edu.au server ntp0.cs.mu.OZ.AU server ntp1.cs.mu.OZ.AU server au.pool.ntp.org fudge 127.127.1.0 stratum 10 driftfile /etc/ntp/drift multicastclient # listen on default 224.0.1.1 broadcastdelay 0.008 # # Keys file. If you want to diddle your server at run time, make a # keys file (mode 600 for sure) and define the key number to be # used for making requests. # PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote # systems might be able to reset your clock at will. # #keys /etc/ntp/keys #trustedkey 65535 #requestkey 65535 #controlkey 65535 # Don't serve time or stats or trust anyone else by default (more secure) restrict default noquery notrust nomodify # Trust ourselves. :-) restrict 127.0.0.1 --- I am starting ntpd up from /etc/rc.d/rc.local with: # start up ntpd ntpdate dns.iinet.net.au /usr/sbin/ntpd When ntpd first starts up, the log file registers: 6 Jan 01:10:53 ntpd[2597]: frequency initialized 0.000 PPM from /etc/ntp/drift but there are no log entries after that date. ntpd seems to be running still: root[at]mythtv:/etc/rc.d# ps aux | grep ntpd root 2620 0.0 0.7 3640 3636 ? SLs Jan06 1:23 /usr/sbin/ntpd root 10970 0.0 0.1 1772 624 pts/1 S+ 19:29 0:00 grep ntpd is SLs it's normal running state? I'm not sure...
From: Grant on 14 Jan 2006 00:43 On Sat, 14 Jan 2006 15:50:29 +1100, Logical <me(a)privacy.net> wrote: >Been fiddling with ntpd on my slackware 10.0 box for a while now but it >constantly seems to be freezing and allowing the time to drift >significantly. > >root[at]mythtv:/home/mythtv# uname -a >Linux mythtv 2.6.12.3-mythtv #3 Tue Jul 26 23:03:30 EST 2005 i686 unknown >unknown GNU/Linux That's a very old kernel :( I show my .conf as it has some references: # cat /etc/ntp.conf # /etc/ntp.conf for slackware on deltree 2004-11-18 # # Configuration, see # http://twiki.ntp.org/bin/view/Servers/NTPPoolServers # http://ntp.isc.org/bin/view/Support/ConfRestrict # configure local clock as dummy refclock, making sure any clients # know that it is not a high quality clock with stratum = 10 # Note that setting a dummy refclock seems a bad idea (2005-01-08) #server 127.127.1.0 #fudge 127.127.1.0 stratum 10 # drift and log files driftfile /etc/ntp/drift logfile /var/log/ntp_log # Access control and server selection: # set default restrictions restrict default kod nomodify notrap nopeer noquery # select time servers server au.pool.ntp.org server us.pool.ntp.org server ca.pool.ntp.org server uk.pool.ntp.org # restrict local server users less restrict 127.0.0.1 restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap nopeer restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap nopeer # end >ntpd seems to be running still: > >root[at]mythtv:/etc/rc.d# ps aux | grep ntpd >root 2620 0.0 0.7 3640 3636 ? SLs Jan06 1:23 >/usr/sbin/ntpd >root 10970 0.0 0.1 1772 624 pts/1 S+ 19:29 0:00 grep ntpd # ps aux | grep ntpd root 315 0.0 2.7 3564 3564 ? SLs 16:25 0:00 /usr/sbin/ntpd SLs looks normal. # ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== 203.12.160.2 128.250.37.2 2 u 35 64 3 67.584 0.004 0.174 220.233.126.241 203.12.160.2 3 u 34 64 3 106.858 11.430 5.163 192.83.249.31 204.123.2.72 2 u 33 64 3 243.986 9.281 4.893 64.235.218.180 199.212.17.15 3 u 34 64 3 312.490 12.533 10.187 212.13.207.101 194.81.227.227 2 u 32 64 3 407.372 6.152 5.093 Erk! I been testing e100 drivers, box only 12 minutes from last boot, ntpd not yet locked in. What CPU, SMP? Some x86-64 still having timer problems due to drift greater than delta rate ntpd can correct by. Also check your timing sources, many .au servers been turned off to public access due to abuse. Grant. -- Cats are smarter than dogs. You can't make eight cats pull a sled through the snow.
From: Mark Post on 14 Jan 2006 00:44 On Sat, 14 Jan 2006 15:50:29 +1100, Logical <me(a)privacy.net> wrote: > Hi > >Been fiddling with ntpd on my slackware 10.0 box for a while now but it >constantly seems to be freezing and allowing the time to drift >significantly. The "ntpq -p" command will tell you if you're actually getting connected and using the time servers you've specified in /etc/ntp.conf. If not, you probably need to review the "restrict" parameters for each of them. For my time server, I specify "mask 255.255.255.255 nomodify notrap noquery" for them. Mark Post
From: Logical on 14 Jan 2006 02:36 Mark Post wrote: > The "ntpq -p" command will tell you if you're actually getting connected and > using the time servers you've specified in /etc/ntp.conf. If not, you > probably need to review the "restrict" parameters for each of them. For my > time server, I specify "mask 255.255.255.255 nomodify notrap noquery" for > them. root(a)mythtv:/home/mythtv# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== dns.iinet.net.a .RSTR. 16 u - 64 0 0.000 0.000 4000.00 fa0-0-1.syd-cor .RSTR. 16 u - 128 0 0.000 0.000 4000.00 sol.ccs.deakin. .RSTR. 16 u - 64 0 0.000 0.000 4000.00 murgon.cs.mu.OZ .RSTR. 16 u - 64 0 0.000 0.000 4000.00 ntp1.cs.mu.OZ.A .RSTR. 16 u - 64 0 0.000 0.000 4000.00 That's my ntpq -p output, the jitter value seems significantly high? I tested each of those servers with ntpdate previously and that allowed me to sync the clock correctly. I will look at upgrading the kernel also. It's a AMD 2100XP, on a Abit NFS2-7 motherboard (nforce2 chipset) with 512 ram. no SMP, not a 64bit chip.
From: Thomas Ronayne on 14 Jan 2006 09:08
Logical wrote: > Hi > > Been fiddling with ntpd on my slackware 10.0 box for a while now but it > constantly seems to be freezing and allowing the time to drift > significantly. > > is SLs it's normal running state? I'm not sure... Yes, it is. Couple of hints: * /etc/ntp/drift should contain a floating point number -- if it is not, put 0.0 in it to start with. * You should have these first server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 (so, when you lose your internet connection, ntpd can sync to the local clock) * You really only need three outside servers (doesn't matter, but three's usually good); use servers with the lowest ping time * Try making these entries the default values multicastclient # listen on default 224.0.1.1 broadcastdelay 0.008 Something else you can do is keep statistics (which, frankly, aren't too useful until you get synchronized) -- stick these lines in your ntp.conf file # # Keep statistics # statsdir /var/log/ntpstats/ filegen peerstats file peerstats type day enable filegen loopstats file loopstats type day enable filegen clockstats file clockstats type day enable and mkdir /var/log/ntpstats Copy the files in /usr/doc/ntp-4.2.0/scripts/stats to /var/log/nptstats, you'll need to edit summary.sh, though -- a working version is listed below. For some reason that I've never been able to discern, NTP didn't work too well in Slackware 10.0 (you might want to think about updating to 10.2), but, once you get it started it'll go forever. Try running /usr/sbin/ntpdate -v ntp-1.mcs.anl.gov ntp-2.mcs.anl.gov (using two servers close to you!) in your rc.ntpd program (or on the command line) and see what is reported -- don't forget to stop any running ntpd before you run it, though. The final thing is making sure your clock is set (with ntpdate) before you start ntpd -- NTP will not sync if the clock is too far off. May seem silly but check your timezone and make sure you're not off an hour or so? My rc.ntpd looks like this (I specify the log file in it rather than in ntp.conf, six of one, half dozen of the other): #!/bin/sh # # start the Network Time Protocol # if [ ${1} = "start" ] then # set the clock from a public server echo "Setting clock from ntp-1.mcs.anl.gov..." /usr/sbin/ntpdate -v ntp-1.mcs.anl.gov ntp-2.mcs.anl.gov sleep 2 echo "Starting Network Time Protocol daemon..." >/tmp/ntp.log /usr/sbin/ntpd -l /tmp/ntp.log elif [ ${1} = "stop" ] then echo "Stopping Network Time Protocol daemon..." pid=`/bin/ps -e | /usr/bin/grep ntp |\ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` if [ "${pid}" != '' ] then kill ${pid} fi fi When it's running (after 15 minutes or so) you should see something like this (LOCAL is there for when the internet goes away for whatever reason): ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) LOCAL(0) 10 l 46 64 377 0.000 0.000 0.001 *adsl.remco.org .PG0A. 1 u 757 1024 377 131.632 -13.555 0.586 +salukes.opensou 80.127.4.179 2 u 865 1024 377 125.241 -14.664 0.693 +ensb.cpsc.ucalg 192.12.19.20 2 u 871 1024 377 60.771 -16.972 0.636 Hope some of this helps a little. -- Everything works -- if you let it. |