Re: [ntp:questions] GPS-PPS, standalone server. NTP
Fida Hasan wrote: On Thursday, June 8, 2017 at 6:37:04 AM UTC+10, David Lord wrote: : Le mardi 6 juin 2017 15:28:27 UTC+2, David Taylor a écrit : On 06/06/2017 13:11, wrote: [] Some GPS will continue to deliver a PPS signal even if the lock is lost. I'm thinking particularly about the Garmin 18xLVC where it is clearly indicated in the documentation (4.4.1): 'After the initial position fix has been calculated, the PPS signal is generated and continues until the unit is powered down.' With the use of that 'kind of' GPS, ntpd will continue to provide time service. As I understand it, NTP will only continue to provide a service if it has other "time-of-day" sources available. Should the NMEA output (as the only time-of-day source) become invalid, NTP would reject it, and gradually ramp itself up to stratum-16 so as to become invalid as a server to its clients. [1 - I'm unsure off the top of my head what NTP checks to know whether NMEA is valid or not. 2 - I wonder what the drift in the GPS 18x LVC is when unlocked?] -- Cheers, David Web: http://www.satsignal.eu At least on my 'Garmin', when a fix is not valid the position is not given but the time message remain available. The GPS internal clock continue to work. One question is to know how stable and precise can be the internal clock of a 18xLVC GPS model? I don't have yet the answer but if it's comparable with the one in a Raspberry or Odroid chip then I'm an happy man for some hours:) Hi NMEA from my 18xLVC was +/- 300ms so I used fudge stratum so that it didn't affect time accuracy if PPS wasn't available. Sometimes there was an inversion layer preventing good GPS reception. The LVC was swapped out to be replaced by a SURE which was still reliable when the PC went down in March this year an has not yet been replaced. from my ntp.conf: server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb David Hi David, I was just wondering to know the accuracy you have achieved through driver 20? Did it turned down to 1-miro or around it? Regards, Fida Hi with the two gps I've tried, driver 20 is only accurate enough for numbering the second, say +/- 400ms for my LVC and maybe +/- 100ms for the Sure. Combined with driver 22 I had accuracy down to few us, mostly better than 1us. If you have other internet sources use of driver 20 isn't essential. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
David Taylor wrote: On 21/02/2015 07:04, William Unruh wrote: [] orphan mode is about a group of computers. Orphan Mode allows a group of ntpd processes to automonously select a leader in the event that all real time sources become unreachable (i.e. are inaccessible). chrony's is that you can enter the time by hand (Ie, by typing a current time and hitting enter) on a single machine. You are the remote clock. Now, how useful that is now adays is open to question, but in the past with telephone modems and flaky connections it was worth something. And if you are setting up something on the Hebrides or on a buoy in the Atlantic where no connection of anykind is possible, it could be useful. Ie, it IS different from orphan mode. Things chronyd can do that ntpd can?t: chronyd provides support for isolated networks whether the only method of time correction is manual entry (e.g. by the administrator looking at a clock). The claim is for networks, not single machines. When I was on dialup with Demon, I used chrony on the dialup pc and my network of several pcs, mostly with ntpd, synced to that. I'd have a problem looking up the logs that far back but I don't think drift from chrony offline was above a few ms. My pcs in the late 80s through early 90s seemed to have better system clocks than modern pcs and also had provision to use an external source as system clock. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar wrote: On Mon, Feb 16, 2015 at 12:56:27PM +, David Lord wrote: I've just fetched chrony-2.0-pre1. It seemed to compile and install ok on NetBSD-6/i386. The client IS one of the servers configured in chrony.conf and it behaved same as with 1.31. I didn't know this was such a common configuration. As a workaround you can add acquisitionport 123 to chrony.conf to use just one socket for all (client, peer, server) communication, which will effectively disable the check in which the server's request is failing. Done and ready for next restart. That was it, as restart after the client had been removed from chrony.conf the client picked up a reply from chrony. So that bug still needs fixing. I'm not sure what's wrong, it seems to be working for me with 2.0-pre1. Nothing wrong, it started working ok after I had removed that client from the config file. I'd just used the same server lines as I had in my ntp.conf. Assuming acquisitionport 123 works I can use the same peer and server lines. thanks David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar wrote: On Mon, Feb 16, 2015 at 03:51:07PM +, David Lord wrote: Miroslav Lichvar wrote: As a workaround you can add acquisitionport 123 to chrony.conf to use just one socket for all (client, peer, server) communication, which will effectively disable the check in which the server's request is failing. Done and ready for next restart. Apparently, that workaround is not usable with 1.31, sorry for the noise. That was it, as restart after the client had been removed from chrony.conf the client picked up a reply from chrony. So that bug still needs fixing. I'm not sure what's wrong, it seems to be working for me with 2.0-pre1. Nothing wrong, it started working ok after I had removed that client from the config file. I meant with 2.0-pre1 the clients should be getting responses even if they are configured as servers in chrony.conf with otherwise standard configuration. It seems to work for me. If it doesn't for you, can you please post your chronyd -d -d output? Hi I am using 2.0-pre1. The clients were not getting responses when they were configured as servers in my original chrony.conf. Since I added the acquisitionport 123 line it has been responding to requests. I saw that the chronyd -d -d output flagged errors due to either chrony.keys and/or keys directory from ntpd and after these were cleared chronyd started ok and was responding to requests without need of the acquisitionport 123 line. Script started on Tue Feb 17 01:37:23 2015 bash-4.3# /usr/local/sbin/chronyd -d -d -4 -f /usr/local/etc/chrony/chrony.conf 2015-02-17T01:37:29Z main.c:433:(main) chronyd version 2.0-pre1 starting (+CMDMON +NTP +REFCLOCK -RTC -PRIVDROP -DEBUG +ASYNCDNS +IPV6 -SECHASH) 2015-02-17T01:37:29Z reference.c:193:(REF_Initialise) Frequency -0.073 +/- 4.049 ppm read from /var/db/chrony/chrony.drift 2015-02-17T01:37:34Z sources.c:454:(log_selection_message) Selected source 192.168.59.61 2015-02-17T01:54:32Z main.c:528:(main) chronyd exiting bash-4.3# exit Script done on Tue Feb 17 01:54:42 2015 Thanks David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
David Lord wrote: Rob wrote: I am experimenting with chrony 1.31 as an alternative on some PPS synchronized servers. It appears to run OK, it is tracking very nicely: . Me too, I downloaded compiled and installed earlier this morning on NetBSD-6/i386. When I was on dialup, I used chrony on linux from mid 80s then on MetBSD and FreeBSD from 1997 to 2005. My internal network used ntpd and had no problem with that getting time from the router running chrony. I might try to search out an old chrony.conf as I still used it on my laptops for a while after 2005. I've now tried with chrony.conf from 20140703 and 20100104 and see same failure to connect of ntpd clients (I couldn't see any significant differences in those conf file anyway). I'll try to find chrony-1.27. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP offset doesn't change.
Harlan Stenn wrote: David Lord writes: ... The one big flaw with ntpd is that when motherboard temperature changes too quickly the ntpd control loop is broken and ntp offset can rise from 300u to 10ms. That might have been a false alarm. I've not yet been able to search all the logs. I've not found the 10ms offsets which might have been on one of the pcs which is now offline. I have found offsets 1ms which were due to reboots and some 100ms after internet connection was lost for 8 hrs (those were mostly during the following 12hrs whilst ntpd was regaining sync to 300u). Some of my pcs are located in unheated rooms and I guess temperatures can vary from below zero to above 25C when in full sun. Tonight the back room was around 2C and wiil be much lower early morning. Other pcs are comfortable in a heated room at 18-24C. David Assuming the above is true (and I have no reason to doubt David's numbers) I have to wonder if it would be an appropriate GSoC project to write something that monitors and tracks available temperature sensors and correlates temperature (perhaps with the first derivative) with the resulting effect on clock frequency. Once a suitable data gathering mechanism was in place, we could then decide on a way to get this information into ntpd or any other software package that cared about it. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Rob wrote: I am experimenting with chrony 1.31 as an alternative on some PPS synchronized servers. It appears to run OK, it is tracking very nicely: Reference ID: 80.80.83.48 (PPS0) Stratum : 1 Ref time (UTC) : Sun Feb 15 22:34:01 2015 System time : 0.00076 seconds fast of NTP time Last offset : +0.00085 seconds RMS offset : 0.00751 seconds Frequency : 10.014 ppm slow Residual freq : -0.004 ppm Skew: 0.042 ppm Root delay : 0.00 seconds Root dispersion : 0.17 seconds Update interval : 16.0 seconds Leap status : Normal However, it does not reply to NTP requests from other systems with ntpd. (I can confirm that in a network trace) Me too, I downloaded compiled and installed earlier this morning on NetBSD-6/i386. When I was on dialup, I used chrony on linux from mid 80s then on MetBSD and FreeBSD from 1997 to 2005. My internal network used ntpd and had no problem with that getting time from the router running chrony. I might try to search out an old chrony.conf as I still used it on my laptops for a while after 2005. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP offset doesn't change.
William Unruh wrote: On 2015-02-14, Paul tik-...@bodosom.net wrote: On Sat, Feb 14, 2015 at 2:09 PM, William Unruh un...@invalid.ca wrote: Yes but you said This means that if you are using say a PPS source, which gives microsecond long term offset, it can take many hours to get there and I was responding to that. If you refuse to accept that your previous statements set the context for a discussion then you're just an ANON troll. Hardly anon. But if the context was PPS, then I agree that I was probably wrong (not being able to remember what my test system was doing.) To get the discussion started, lets compare some of the differences between chrony and ntpd. BZT. NTPd is yesterday's news. It's core is unlikely to change absent a security flaw. Design discussions about it are useless and unhelpful (but they should still be on more relevant list). Come back when you're ready to write about the differences between Chrony and Ntimed with reasons to select one or the other. In the meantime be a better advocate of alternatives to NTPd i.e. get unstuck from the past and port Chrony to Windows. When timed is actually out I may be interested in testing it again. However, you discussion indicates to me that there the design of timed had not advanced from that of ntpd. Whether it is yesterday's news or not, it seems to be determining tomorrow nontheless. You have not given any indication that the design discussion has moved on from ntpd. Research is needed, and such research should be part of any new system. Is it there? Ntimed has a few constraints -- no research needed: 1) Be safer (simpler) than ntpd. 2) Be smaller than ntpd. 3) Be as good or better than ntpd where better is probably slippery. None of those indicate that anything about the design has changed. You know much better than I do I would assume. No idea what is unsafe about ntpd. Smaller may be possible, mainly be cleaning up the accretion of code. And I would like to hear about what better means. I have mentioned why I believe chrony is better. What do you mean by better? It's not clear to me if worrying about dial-up costs is an Ntimed concern (I doubt it) but if it is for you then use Chrony. Dialup costs? Where did I ever mention dialup costs? And chrony's ability to handle dialup is simply an indication of its greater flexibility. Dialup costs never played a role in the design of chrony, except in making it flexible enough to handle the situation of intermittent connectivity to a time source. I am beginning to wonder who the troll is here. I have given you detailed answers to your question, you come back with irrelevancies and snarky comments. Hi I must be a troll since I disagree with you. I used chrony during the 90's, probably because my isp was demon. I also tried ntpd but with my pcs not being online 24/7 and using dialup for internet connection ntpd wasn't really usable. Late 90's to 2005 I eventually had several pcs online 24/7 and found that ntpd gave lower and more stable offsets than chrony but I still needed to use chrony on the dialup pc. The one big flaw with ntpd is that when motherboard temperature changes too quickly the ntpd control loop is broken and ntp offset can rise from 300u to 10ms. I've downloaded ntimed which compiled ok so will give it a try in a few days. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP offset doesn't change.
Rob wrote: Terje Mathisen terje.mathi...@tmsw.no wrote: Charles Swiger wrote: On Feb 12, 2015, at 1:56 AM, Rob nom...@example.com wrote: However, what I observe is that the plots of the offset show the derivative of the environment temperature, which unfortunately cannot be controlled any better. I am considering to locate the crystal that is responsible for the timing and see if it could be ovenized or replaced by a more I've considered packing some insulation around the crystal, this would tend to stabilize (while also increasing) the temperature, but this would also be likely to reduce its lifetime, and the motherboard would probably conduct heat too well. That will only slow down the rate of change, and probably not much. We tend to have temperature cycles over 24h and this will not help. At least in my case on occasions the rate of change seems to be faster than the control loop can handle and offsets of my various pcs rather than being 300u rise to 10ms. Only a small reduction in rate of change would be required to avoid this. Thermostatic temperature control at the crystal or a stable external clock source would be better but more difficult to implement. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP offset doesn't change.
William Unruh wrote: On 2015-02-12, Charles Swiger cswi...@mac.com wrote: On Feb 12, 2015, at 1:56 AM, Rob nom...@example.com wrote: Charles Swiger cswi...@mac.com wrote: On Feb 11, 2015, at 7:23 AM, Rob nom...@example.com wrote: However, what I observe is that the plots of the offset show the derivative of the environment temperature, which unfortunately cannot be controlled any better. I am considering to locate the crystal that is responsible for the timing and see if it could be ovenized or replaced by a more temperature-stable oscillator. However, one can argue that it could be fixed in software as well. ntpd could sense a changing drift and extrapolate it, if necessary helped by input from a temperature sensor. You're describing a TCXO; using a temperature sensor to compensate for thermal drift would gain perhaps a factor of 5 accuracy. No, that is a hardware solution. There are software solutions-- a termistor to meaure the temperature of the crystal ( or somethign nearby) which feeds that measurement to the OS. the revised ntp then reads the temperature, and corrects the drift rate as a function of that temperature. This means that the change in the ntpd drift rate does not only depend on the offset meaured but also on that temperature. Since it takes a while for a temperature to be reflected in the offset, this makes ntpd track the correct rate of the clock much more closely. Yes, factors of 5 are easy. Actually, I suspect that oneof the reasons that chrony does so much better than ntpd does in disciplining the clock ( 2-20 times better) is because it reacts to such temperature changes much more rapidly. It can do so because it keeps a memory of the drifts and offsets and can see changes much more quickly. It also does not throw away 85% of the measurements to correct round trip errors, so can also react faster because of that. This is all without controlling the temperature of the oscillator (TCXO) but rather measuring that temperature-- much cheaper. Solutions that measure the temperature require calibration for the individual crystal as with the cheap crystals used the drift per deg C can be either positive or negative and also depending on cut of the crystal can follow a parabolic or lazy S curve. The alternative of fitting a simple heater with temperature control to the crystal seemed to be more effective and with pps ntp source the offset was 300n. There might still be examples on the web where this has been done but the references I used have long since been taken down. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Rejected peers. But why?
Sander Smeenk wrote: Hi, On a system that has been running for quite some time now i find that the ntpq output looks like this: | remote refid st t when poll reach delay offset jitter | == | nscache1.dmz.bi 213.136.0.2522 u 585 1024 3770.6140.058 0.310 | nscache2.dmz.bi 213.136.0.2522 u 774 1024 3770.4140.116 4.459 | ntp3.dmz.bit.nl 213.136.0.2522 u 21 1024 3771.0390.172 0.521 | *ntp4.bit.nl .PPS.1 u 620 1024 3770.7010.126 0.131 | . Can someone please explain why the first three peers are in 'condition: reject' and wether or not this will recover automaticaly? The poll, reach, delay, offset and jitter values do not seem way out of hand to me. Why is ntpd not syncing to the three peers? I'm fairly certain it will sync to them when i restart the process, but for now i'll leave it like this... Hi $ ntpq -4 -p me6000e remoterefidst t poll reach delay offset jitter (s) (ms)(ms) (ms) = *GPS_NMEA(2) .GPSb. 7 l 64 377 0.000 -1.786 7.863 oPPS(2) .PPSb. 0 l 16 377 0.000 0.000 0.004 +mail0.lordy 81.187.61.78 3 u 64 377 0.801 -0.006 0.416 +mail.lordyn 81.187.61.78 3 u 64 377 0.869 0.010 0.509 +ns3.lordyne 81.187.61.78 3 u 64 377 1.309 -0.209 0.481 e350n1b.hom 192.168.59.61 2 u 64 377 0.459 0.014 0.586 me6000g.hom 192.168.59.61 2 u 16 377 0.480 0.001 0.597 p3x1300.hom 192.168.59.61 2 u 64 377 0.317 0.356 0.544 +xxx 195.66.241.2 2 u 256 377 18.087 -1.466 0.365 E350n1b, me6000g and p3x1300 can't be selected because they are all synced to me6000e. You possibly need to add at least one extra independent ntp source. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP, GPSD PPS
Sander Smeenk wrote: Hi, I run a stratum 1 server which has a Garmin LVC 18x connected to its ttyS0. The GPS provides a PPS signal via serial and i use gpsd to provide the NMEA sentences and pulse data in shared memory to NTP. This partly works. NTP syncs against the PPS signal but the NMEA signal is always marked as falseticker even though i managed to bring down the offset to -1.5ųsec average by fudging the time a bit. The NMEA signal offset fluctuates a lot. From ~ -65ųsec to ~ +75ųsec. The GPS provides 9600bps serial comms. Would it help to speed this up to 19200bps? I've already disabled all NMEA sentence output for sentences that aren't useful for timekeeping but at this moment i have to use external clocks to sync against. Few questions: 1) Can i get a 'true PPS sync' with this setup? Eliminating gpsd so 'ntpq -p' shows 'oSHM(1)' instead of '*SHM(1)' ? Hi Jun 21, 2009: My Garmin 18x LVC gave just acceptable performance with the NMEA driver due to having to tune the fudge offset at almost the limit that avoided the wrong second. For PPS I used the ATOM driver and was getting an offset of 6us. Shortly afterwards Garmin released a firmware fix which fortunately I avoided as the nmea output could over-run into the following second. I'd need to search my backups for the exact server and fudge config lines. Currently I'm running NetBSD-6/i386 and ntpd 4.2.7p476 and my ntp.conf for a Sure GPS has: tos minsane 3 tos orphan 10 tos mindist 0.4 server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb plus one local peer and four local servers NB. the mode and fudge time2 are specific for the Sure GPS. David 2) What could i possibly do to get NTP to sync/accept the NMEA data, other than set it as a truechimer in the configuration? 3) Why does last_event show clock_alarm for the PPS SHM signal in assoc? At this moment my 'ntpq -p' looks like: | # ntpq -np | remote refid st t when poll reach delay offset jitter | == | 127.127.28.0.NMEA. 0 l 10 16 3770.000 -52.910 12.585 | *127.127.28.1.PPS.0 l9 16 3770.000 -0.002 0.002 | -193.67.79.202 .PPS.1 u 50 64 3773.6900.331 0.073 | +193.79.237.14 .PPS.1 u 48 64 3772.7530.128 0.725 | +80.94.65.10 .PPS.1 u 63 64 3773.2260.005 0.498 | -130.89.0.19 103.52.146.131 2 u 30 64 3775.417 -0.100 0.041 | # ntpq -c rv | associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync, | version=ntpd 4.2.6p5@1.2349-o Wed Oct 9 19:08:06 UTC 2013 (1), | processor=x86_64, system=Linux/3.13.0-39-generic, leap=00, stratum=1, | precision=-23, rootdelay=0.000, rootdisp=0.386, refid=PPS, | reftime=d8318503.7827c0d3 Tue, Dec 9 2014 15:26:11.469, | clock=d831850e.45ff40f3 Tue, Dec 9 2014 15:26:22.273, peer=53550, tc=4, | mintc=3, offset=0.001, frequency=-19.125, sys_jitter=0.003, | clk_jitter=0.001, clk_wander=0.000 | # ntpq -c as | ind assid status conf reach auth condition last_event cnt | === | 1 53549 9024 yes yes nonereject reachable 2 | 2 53550 964b yes yes none sys.peer clock_alarm 4 | 3 53551 931d yes yes none outlyer 1 | 4 53552 9424 yes yes none candidate reachable 2 | 5 53553 9424 yes yes none candidate reachable 2 | 6 53554 931d yes yes none outlyer 1 Thanks for any input! -Sander. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Red Hat vote for chrony
William Unruh wrote: On 2014-12-09, Charles Swiger cswi...@mac.com wrote: On Dec 9, 2014, at 2:41 AM, Terje Mathisen terje.mathi...@tmsw.no wrote: [ ... ] Yes; you're describing calibrating a temperature-compensated XO, or TCXO. There are also versions of ntp which have a temp compensation/measurement system compiled in to apply to the clocks. It does tend to give much better control of the clock than regular ntpd apparently. It does help: On motherboards with a temperature sensor close to the master crystal, you can get somewhere in the 2-10x range improvement in the size of temperature excursions. I'd agree with this, although the best case is probably not quite an order of magnitude, more like a factor of 5x. Or perhaps I shouldn't be too optimistic about how bad a really cheap crystal can be. :-) The correct solution is of course to not depend on $0.10 crystals as the time base for dedicated NTP servers. :-) Well, yes. You can get a PCI(e) card with a TCXO or OCXO and an optional GPS module like the Beagle ClockCard or a SpectraCom TSync for a few hundred bucks. That's quite a bit more than a $40 GPS puck, but these will also freewheel for a lot longer before losing or gaining a second in error: ~2 seconds/month if kept stable at 23C, I believe one said. I suspect even the cheap ones can do that if kept stable at 23C. (that is about 1PPM) And if you could put a fast thermal probe onto the crystal, you could probably do as well even in a flutuating environment with an addition to ntpd/chrony to use the temp data to compensate the clock rate. Then it would be really useful to keep a long string of data on the offsets and the temp to get a better set of coeficients for the temperature dependence of the rate. Does anyone know in general what fraction of the variablility of those cheap crystals is due to temp, and how much is due to other sources(crystal defect motion for example, or capacitor aging drift). My xtal book gives either parabolic or lazy-s curves but the real problem with cheap crystals is that the turning point or flat sections can be way off the ambient temperature. David Regards, ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Poul-Henning Kamp and re-write of NTP
David Woolley wrote: On 07/12/14 17:48, Paul wrote: That's unnecessary complexity. refclock_atom is only ~ 200 lines. The code just needs to be adjusted so you can build with exactly the driver(s) you need plus PPS without (essentially) forcing all-clocks. There's little reason for a given refclock build to target multiple sources. Most ntpd users these days will install binary packages, not build from source. I've had pool servers since end of 2009 and was reasonably happy with stock ntpd that came with NetBSD. Since 2010 I've tried various refclocks for time from DCF, MSF then GPS. Stock ntpd is rather old and some options of ntp-dev looked to offer some advantages so since 2012 I've been building from source then installing from the binaries on all my systems, now including four pool servers as from Jan 2013. Offset of my Sure GPS synced system, not in the pool, is mostly 5us, internet servers and systems on the lan are mostly 250us. The big improvement I've seen with ntp-dev is that convergence after a restart is quite fast and reboots of my public servers often doesn't give any reduction in my pool scores. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Red Hat vote for chrony
Charles Swiger wrote: On Dec 5, 2014, at 5:55 PM, Paul tik-...@bodosom.net wrote: [ ... ] Even back in 2002 with very inexpensive commodity hardware, FreeBSD was able to achieve accuracy measured to ~260 nanoseconds: H. So phk uses a $1,500 rubidium standard as a system oscillator and you call it inexpensive and commodity. No, he used a $1500 rubidium clock to accurately measure the timekeeping quality of a $220 Soekris computer, and concluded: I have earlier complained that no good and cheap hardware were available which could timestamp a PPS signal reliably and precisely but now the Soekris computer has proven that it does indeed deliver just that: With a pricetag of approx USD220 (single unit including enclosure) this is the best hardware you can find for a stratum 1 NTP server. If you wanted to drive such hardware via a ~$40 GPS puck, you'd probably see an accuracy of around a microsecond, perhaps a bit worse depending on the timekeeping accuracy which the GPS puck provides. That was also the level of accuracy I was seeing from generic Intel hardware running FreeBSD as a stratum 1 with a GPS source. I've used a digital frequency counter which had an onboard TCXO (or possibly a DTCXO) for measuring. Although the frequency counter supported receiving higher-quality PPS timing from an external atomic clock, I've never had a Cs or Rb source, so I won't claim to have measured sub-microsecond accuracy with it. He also ran a particular install of BSD and a non-standard NTP. I believe he ran FreeBSD 4.x and likely the ntpd from ports. Regards, Not quite I believe this clock project needed a little work with soldering iron and also ntpd/freebsd had to be modified to support the sc520 gpio. Soekris net4501 with AMD Elan sc520 cpu which has internal time register resolution of around 100n. System clock I believe used a TAPR clock-block frequency synthesizer and a FATpps signal conditioner kits. I couldn't find any UK supplier for the parts and shipping costs from the states was too expensive. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Number of Stratum 1 Stratum 2 Peers
Brian Utterback wrote: On 12/2/2014 4:00 AM, Rob wrote: The whole have 3 servers to select a majority thing is absolutely not required when your servers are accurately synchronized themselves and your requirements are only within-a-second. It is true that when you have two servers the clients cannot know which one is right, but it is trivial to keep servers within a millisecond of eachother with GPS and within 10 milliseconds using only network peering. To that is two orders of magnitude better than you require. Be careful with this generalization. While it may be trivial, it isn't automatic. I deal with customers all the time that have configured exactly two servers on their clients and then are surprised later when all of the clients become unsynchronized and start free drifting. I always recommend against it. I still think that it takes four to guarantee a majority but I don't have proof of that. Someday I will spend some time to either prove or disprove it, but alas, time is something I don't generally have extra to spend. But you are better off with one than two from an operational standpoint. The ntp html docs on selection state that four are needed to guarantee a majority and give an example of this case. David Brian Utterback ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] 2xGPS and 4x peers setup - disturbed by 5th and 6th peer
E-Mail Sent to this address will be added to the BlackLists wrote: Martin Burnicki wrote: We have had a case where a customer had one local computing center and 2 ones at different remote locations. In each of the computing centers were 2 GPS controlled LANTIME NTP servers installed. In the local computing center there was also a Linux server running ntpd which had all 6 LANTIMEs configured as time sources. Unfortunately the internet connection of the local computing center seemed to have an asymmetry in the packet delay, so from the Linux client's point of view all 4 LANTIMEs in the remote locations seemed to have a time offset in the same range, a few milliseconds, compared to the 2 local LANTIME. Even though all the 4 remote servers showed much more jitter due to the long network path they were preferred by the Linux client, and the 2 local LANTIMEs were marked as falsetickers even though they showed much less jitter. If I remember correctly then the Linux client was running 4.2.6p?, and a test with a -dev version of ntpd showed that the newer ntpd preferred the 2 local LANTIMEs over the 4 remote ones. This seems to indicate that the weight put on different criteria in the selection algorithm has changed over versions, and the newer versions of ntpd act more like you'd expect. TOS MinDist affects this. e.g. in the case of serial nema and pps, sometimes the mindist needs to be increased from 1ms to perhaps 20ms, and I've seen as much as 400ms (fairly often); {which makes me wonder if the PPS is inverted?} Hi In my case that's been a figure large enough to span the range of offset variation (both Garmin and Sure have been used). For a while Garmin weren't even usable until a firmware fix was released, as the range of offsets exceeded one second. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server not reducing polling interval on upstream hosts
Phil W Lee wrote: Hi people. I've got a server running FreeBSD 8.1 with the included ntpd 4.2.4p5 Yes, I know it's not the latest version, but it's well firewalled and the security restrictions are in place to prevent it being used in DDOS attacks. The problem I am having is that it is stuck on polling the upstream stratum 1 servers it uses as a sanity check every 64 seconds. (it's main source is a Garmin GPS 18x with PPS, based on the excellent guides by David Taylor and Ryan Doyle). I did have minpoll 6 maxpoll 10, which should allow it to reduce the polling interval to 1024s, and I've now tried removing the explicit settings to allow it to use the default, but it is still sticking on that 64s polling time. I've left it 24 hours on both the default and explicitly defined settings, with no positive result on either. I don't really want to set the minpoll too high, as it takes such a long time to synchronise after rebooting or restarting ntpd. I'd prefer to be a good netizen and not hammer the upstream servers as hard as that, but it isn't playing. It used to, before I installed the Garmin and turned it into a stratum 1 server. Does anyone have any ideas? Hi I'm stuck at the minpoll rate set in the server line for each particular source. I've not considered it a bug. Ntpd version 4.2.7p444@1.2483-o on NetBSD/6.1, distfile is downloaded from ntp.org then built and run from /usr/local. The ntp-dev version conflicts with stock NetBSD version and I have edited /etc/rc.d/ntpd to point to /usr/local. Version of ntpd you have, 4.2.4p5, is very old but it should be easy for you to update either from FreeBSD ports or as I have done from the ntp.org source tarball: http://www.eecis.udel.edu/~ntp/ntp_spoool/ntp4/ntp-dev/ntp-dev-4.2.7p???.tar.gz David * # $NetBSD: ntp.conf, 2014/04/10 xx:xx:xx dml Exp $ .. tos minsane 3 tos orphan 10 tos mindist 0.4 # /dev/pps2 - /dev/tty00 server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb # local peers: peer -4 me6000g.home.lordynet.org minpoll 6 maxpoll 6 iburst # local servers: server -4 ntp0.lordynet.org.uk minpoll 6 maxpoll 6 iburst server -4 ntp1.lordynet.org minpoll 6 maxpoll 6 iburst server -4 ntp3.lordynet.org minpoll 6 maxpoll 6 iburst # remote servers: server -4 xx minpoll 8 maxpoll 12 iburst * -bash root@me6000e $ ntpq -crv -p associd=0 status=011d leap_none, sync_pps, 1 event, kern, version=ntpd 4.2.7p444@1.2483-o Thu May 22 09:51:04 UTC 2014 (1), processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, precision=-17, rootdelay=0.000, rootdisp=400.165, refid=PPSb, reftime=d7eba026.53913a21 Fri, Oct 17 2014 14:03:18.326, clock=d7eba032.15e5535c Fri, Oct 17 2014 14:03:30.085, peer=12161, tc=4, mintc=3, offset=0.000965, frequency=-35.060, sys_jitter=0.007629, clk_jitter=0.002, clk_wander=0.003, tai=35, leapsec=20120701, expire=20141228 remote refidst t poll reach delay offset jitter = *GPS_NMEA(2) .GPSb. 7 l 64 377 0.000 -13.728 3.308 oPPS(2).PPSb. 0 l 16 377 0.000 0.001 0.008 me6000g.home. 192.168.59.61 2 s 64 376 0.861 -0.421 0.460 +mail0.lordyne 81.187.61.78 3 u 64 377 1.659 -0.418 0.442 +mail.lordynet 81.187.61.78 3 u 64 377 1.047 -0.266 0.526 +ns3.lordynet. 81.187.61.78 3 u 64 377 0.736 -0.577 0.497 +x 195.66.241.3 2 u 256 377 17.827 0.471 1.234 * ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Compensating for asymmetric delay on a per-peer/server basis?
mike cook wrote: Le 11 sept. 2014 à 21:08, Paul a écrit : On Thu, Sep 11, 2014 at 2:08 PM, mike cook michael.c...@sfr.fr wrote: Did I miss something? On Tue, Sep 9, 2014 at 3:17 PM, Rich Wales ri...@richw.org wrote: My home LAN is connected to my school's network via a cable modem. If we make the (safe) assumption of a common cable ISP/FiOS in the Palo Alto area the path is asymmetric. Yup, AsymmetricDSL does have different up/down bit rates. What I really meant was that the difference would not explain his issue. ex: with a 12Mbps down rate and 1.3Mbps up rate, the ratio is around 40usec to 300usec transfer of a 48byte NTP packet. Hi My experience is different. Due to uplink pipe being very much less capable than downlink I had 10-100ms latencies if pipe was full. Solution for me was to limit my outgoing rates to 80-90% which actually increased upload speed by almost 2x. I've adjusted that filter since 2005 each time my adsl has been upgraded. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS as a falseticker!!!
valizade...@gmail.com wrote: thanks for the reply i added tos mindist X and changed x from 0.001 to 10 but none of them worked! any answers for my questions in first post? especially the first one! Hi The settings needed can depend on your gps device, make, model, firmware release etc. For my 'sure' gps as well as tos mindist 0.4 I have: server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb The time2 value was obtained by setting 'noselect' rather than 'prefer' and monitoring the GPSb offset over a few days then setting time2 to a value that included that range. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS as a falseticker!!!
Mike S wrote: On 8/27/2014 5:48 AM, valizade...@gmail.com wrote: I not sure, how should I write the ntp.conf file to achieve the maximum accuracy using pps. i don't know if the ntpd use the pps or not in my case! Sometimes it is recognized as a falseticker (x) and sometimes it is OK(o) !!! Try adding tos mindist 0.02 to your config. NMEA tends to wander around - the default mindist of 0.001 can result in what you see. You might try setting it even higher, and work your way down to a reliable minimum. Hi For several years I've used: tos minsane 3 tos orphan 10 tos mindist 0.4 currently with PPS, NMEA, 2 x local pcs, 4 x local pool.ntp.org servers and one remote source. ntp-dev-4.2.7p444 on NetBSD-6/i386 David From the docs: mindist mindistance Specify the minimum distance used by the selection and anticlockhop algorithm. Larger values increase the tolerance for outliers; smaller values increase the selectivity. The default is .001 s. In some cases, such as reference clocks with high jitter and a PPS signal, it is useful to increase the value to insure the intersection interval is always nonempty. I tested different ntp.conf and here are some results (ntp.conf and ntpq-p): #TEST:1 - ntp.conf--- server 127.127.22.1 minpoll 4 #PPS server 127.127.20.1 prefer minpoll 4 mode 16 #GPS fudge 127.127.20.1 flag1 1 flag3 1 - GPS on COM port (PPS connected to DCD pin) remote refid st t when poll reach delay offset jitter == xPPS(1) .PPS.0 l3 16 3770.000 30.681 29.011 oGPS_NMEA(1) .GPS.0 l2 16 3770.000 29.964 29.404 ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] LOCL clock reachability not 377?
Rob wrote: Harlan Stenn st...@ntp.org wrote: Rob, You have seen 'flag1' in the recent ntp-dev SHM driver documentation, right? I have installed ntp-dev and as part of that also ntp-dev-doc, but it is essentially empty (only an automatically generated changelog). There appears to be a package ntp-doc-dev on the site, but I cannot install it as my system is 64-bit and the repository cannot be installed on it. I can only install the source repository and apparently the doc package is in the binary repository. Who still has those i386 systems out there? Why doesn't ntp-dev support 64-bit?? Hi Most of my systems run ntp-dev from /usr/local rather than the supplied ntpd. On Ubuntu this was a bit more of a fiddle than with NetBSD. NetBSD/6.99.43 amd64 is already using ntp-dev but an older version than I have on NetBSD/6 i386. Neither have I used a refclock with any of my systems now running amd64. $ ntpq -crv -p associd=0 status=061b leap_none, sync_ntp, 1 event, leap_event, version=ntpd 4.2.7p404-o Fri Dec 27 19:28:17 EST 2013 (import), processor=amd64, system=NetBSD/6.99.43, leap=00, stratum=2, precision=-21, rootdelay=0.911, rootdisp=403.422, refid=192.168.59.61, reftime=d7a2d1ab.b09a144b Sat, Aug 23 2014 8:39:07.689, clock=d7a2d1d8.9f549c5e Sat, Aug 23 2014 8:39:52.622, peer=45181, tc=6, mintc=3, offset=0.186565, frequency=17.424, sys_jitter=0.352233, clk_jitter=0.093, clk_wander=0.004 remote refidst t poll reach delay offset jitter = +d525mw03 192.168.59.61 2 s 64 3770.120 -0.032 0.716 +e350n1c 192.168.59.61 2 s 64 3760.077 -0.144 0.034 +p4x2666 192.168.59.61 2 s 64 3760.165 -0.230 0.031 *me6000e .PPSb. 1 u 64 3770.9110.187 0.352 +me6000g 192.168.59.61 2 u 64 3770.263 -0.239 0.067 +mail 81.187.61.78 3 u 128 3770.362 -0.023 0.549 +mail0 81.187.61.78 3 u 128 3770.648 -0.363 0.644 +ns3 81.187.61.78 3 u 128 3770.447 -0.210 0.093 David Anyway, I checked the ntpd/refclock_shm.c source and I cannot find any reference to flag1 in there. So I'm lost. What is the magic? ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Embedded solutions
Paul wrote: On Mon, Jul 7, 2014 at 4:38 PM, David Lord sn...@lordynet.org wrote: I'd have to look this up but think board using Elan 486 used the on chip high speed timer to timestamp the pps input at a gpio port along with a custom ntpd on FreeBSD to obtain sub us offset. Perhaps you're referring to this: http://phk.freebsd.dk/soekris/pps/ Illustrated here: http://www.febo.com/time-freq/ntp/soekris/ Possibly but I've not checked your link. This is what I was remembering from article by John Ackermann. ! Well, It's Right Up There, Anyway... ! ! This is a Soekris net4501 computer modified to use a TAPR ! Clock-Block frequency synthesizer and a TAPR FatPPS signal ! conditioner. ! ! When fed with a quality reference signal at 10MHz to drive the ! system clock, and a quality PPS signal to provide timetags, it ! can keep time to within a few hundred nanoseconds . ! The secret to the net4501's timekeeping capability is its use ! of an AMD Elan SC520 CPU which has internal time registers with ! a resolution of about 100 nanoseconds. With a little hardware ! and software magic (figured out by Poul-Henning Kamp), this ! timer can be used to capture PPS timetags far more precisely, | and with much less jitter, than the traditional method of using ! an RS-232 serial port control line as the input. . I considered a Soekris but couldn't find any UK supplier and cost from the US was far too much considering the board has to be hacked to replace xtal with TAPR input and connect the pps to gpio input. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Embedded solutions
Rob van der Putten wrote: Hi there Jaap Winius wrote: Has anyone here managed to turn a relatively cheap, ARM-based embedded system with a serial port into a decent stratum 1 NTP server? Thus far I've always attached my GPS and radio time signal receivers to much larger x86 hardware platforms, but those machines have other things to do and make the NTP server less stable than it can be. However, if I were to use dedicated hardware for the NTP server, I'd rather it power- efficient and as cheap as possible. I've looked at the BeagleBone Black (with an RS232 Cape) AFAIK the BBB 232 cape doesn't support DCD, so PPS is not available. and the Wandboard (both ARM platforms), Same problem. but have not had any success with them. There are stories stories of people who have done it with Soekris hardware (x86), but that's much more expensive. AFAIK Soekris has a 'regular' serial port. I'd have to look this up but think board using Elan 486 used the on chip high speed timer to timestamp the pps input at a gpio port along with a custom ntpd on FreeBSD to obtain sub us offset. David Regards, Rob ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntp-dev: PPS is a falseticker?
mike cook wrote: Le 14 juin 2014 à 10:27, Rob a écrit : The PPS source is a GPSDO which provides 1PPS, 10 MHz and status on a serial port, but no date information (it does provide time, but that is not very useful without date). So I choose not to use the time info and use external (network) sources are used for that. This has worked before using 4.2.6p5. I doubt it. I have the same issue with both 4.2.6p5 and 4.2.7p444. No prefer peer, no dice. This is FreeBSD 8.2 $ ntpd --version ntpd 4.2.6p5 ntpd 4.2.6p5@1.2349-o Mon Jul 2 04:47:51 UTC 2012 (1) Sat Jun 14 12:35:25 CEST 2014 remote refid st t when poll reach delay offset jitter = x127.127.22.1.PPS1. 0 l5 16 3770.0000.030 0.008 You could set your best source as your prefer peer to get your PPS source taken into consideration. That actually helps! But why? I don't like to mark a source as prefer, certainly not another source than the PPS. Why is there a difference? Is this a workaround for a bug, or is this a feature and if so, what is the rationale behind it? And what is going to happen when the prefer peer happens to be unreachable? will it again go haywire then? If so, what is the point of having multiple sources for redundancy? The same happens when the prefer peer is not available at start time. Hi Now on NetBSD-6/i386 ntpd-4.2.7p444 NetBSD seems to require a reboot to get PPS working. Once up it stays synced until GPS signal is lost which happens here several times a year. /etc/ntp.conf # Sure GPS server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb The stratum 7 seems to prevent ntp from selecting GPS time if pps signal is lost, I tried with stratum 4 in March 2013 then a few months later set stratum 7. Mostly offset from loop_summary is about 4 us but that includes spikes of 35-40us caused by daily and weekly cron jobs. I intend to try an OCXO derived system clock when I have a spare m/b. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntp-dev: PPS is a falseticker?
Rob wrote: David Lord sn...@lordynet.org wrote: NetBSD seems to require a reboot to get PPS working. Once up it stays synced until GPS signal is lost which happens here several times a year. /etc/ntp.conf # Sure GPS server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb The stratum 7 seems to prevent ntp from selecting GPS time if pps signal is lost, I tried with stratum 4 in March 2013 then a few months later set stratum 7. Mostly offset from loop_summary is about 4 us but that includes spikes of 35-40us caused by daily and weekly cron jobs. I intend to try an OCXO derived system clock when I have a spare m/b. I can keep the offset within a microsecond on a standard Linux system once PPS locks on, but the trickery is to make it lock. This is not a standard GPS receiver (with NMEA and/or binary readout of time and status), but a dedicated GPSDO (GPS disciplined oscillator) device with PPS and 10 MHz outputs and an LCD frontpanel and LEDs that tell you the status. It has a serial port where that same info can be polled, but it does not include the date, only happens to include the time. There is no way to read things like almanac, satellite azimuth and elevation, and the like. So what I need to do is query some external servers on the internet to get within a second, and then lock on to the PPS with a clock 22 similar to what you have. But there is no natural because it is local server to prefer, I just need to get a majority vote from external servers, of which I have configred 5. With almost same config as now but prefer being my most reliable local server, I setup a xtal oscillator/divider with pps output as source for type 22 driver and had no problem with ntpd. Tempco of the oscillator was too high so drift was too variable for it to be of use. David I see no problem, really no problem, in this configuration and I wonder why the software makers do see a problem in it and want me to make a configuration decision that introduces yet more problems. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntp-dev: PPS is a falseticker?
David Woolley wrote: On 14/06/14 14:21, David Lord wrote: Mostly offset from loop_summary is about 4 us but that includes spikes of 35-40us caused by daily and weekly cron jobs. I intend to try an OCXO derived system clock when I have a spare m/b. Offset is from measured time, not from true time. The extra load is probably compromising the measurements, not the accuracy of the clock. Hi These are double spikes, one +ve followed by a similar -ve spike. There used to be obvious wide +ve/-ve excursions when the case was in full sunlight but that problem was solved by shielding from the sun. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] MSF Anthorn, UK down
Jan Ceuleers wrote: On 06/09/2014 05:50 PM, Marc-Andre Alpers wrote: Hello! Why have such important service no backup transmitter/antenna like DCF77? Whereas DCF77 might have a backup transmitter (I don't know), I observe DCF77 being down very often, albeit for short durations (5-10 mins). When I do receive it the signal is strong, so I don't think my observations are due to being too far away (I'm in Northern Belgium). Morale: don't put all your eggs in one basket. Hi Mostly too weak in Lancashire UK but at least it has a very accurate phase shift seconds marker. MSF and GPS for me have occasional blackouts, ISTR inversion layer effects used to be common in this area but apparently it's now unknown. MSF was ok as fallback on rare occasions when internet was down. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Some issues about NTP ( Server 2008R2)
hschu...@gmail.com wrote: Hi! Not working again. Actual polling rate: 256. The internal system clock (windows time UTC) was only one time altered between 16:00 and 21:00: As has been already mentioned ntpd needs write access to some of its files. Can you confirm that it has, particularly ntpd.drift (whatever is default or has been cofigured). David Die Systemzeit wurde von 2014-06-04T14:12:55.993298900Z in 2014-06-04T14:12:55.82900Z geändert. Änderungsgrund: Die Uhrzeit wurde von einer Anwendung oder von einer Systemkomponente geändert.. Hartmut ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Some issues about NTP ( Server 2008R2)
hschu...@gmail.com wrote: Hi! ntp.drift is configured and the actual value is 8.898. Hartmut How do you know that ntpd isn't running? If 'ntpq -p' is still working then so is ntpd. If you are wanting ntpd to behave same as windows time then you'd better forget about running ntpd and then you'll be happy (but your time probably won't be as good as from ntpd). David Not from a windows system: $ ntpq -crv -p associd=0 status=011d leap_none, sync_pps, 1 event, kern, version=ntpd 4.2.7p444@1.2483-o Thu May 22 09:51:04 UTC 2014 (1), processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, precision=-18, rootdelay=0.000, rootdisp=400.150, refid=PPSb, reftime=d73a384b.914e86bc Thu, Jun 5 2014 0:28:59.567, clock=d73a3856.6f6569fc Thu, Jun 5 2014 0:29:10.435, peer=31562, tc=4, mintc=3, offset=-0.000312, frequency=-35.047, sys_jitter=0.003815, clk_jitter=0.001, clk_wander=0.002 remoterefidst t when poll reach delay offset jitter *GPS_NMEA(2) .GPSb.7 l 44 64 3770.000 -1.416 12.035 oPPS(2) .PPSb.0 l 11 16 3770.0000.000 0.004 me6000g.home xxx.xxx 2 u 19 64 3770.4700.185 0.560 +ns0.lordynet xxx.xxx 3 u 53 64 3772.0600.737 0.594 +ns1.lordynet xxx.xxx 3 u 45 64 3770.5480.151 0.586 +ns3.lordynet xxx.xxx 3 u 34 64 3770.5120.233 0.565 +ntp2.xxx xxx.xxx 2 u 232 256 377 22.3172.002 0.473 ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Some issues about NTP ( Server 2008R2)
hschu...@gmail.com wrote: Yesterday in the late evening I reinstalled NTP on my Win8.1 64Bit machine (PC06). Today, after awake from hibernation, I recognized that only local clock was polled. All other peers are greyed out. After restarting the ntp-service the LAN time servers are polled, but no windows-clock was set. ntpq -p ist furthermore not working: C:\Program Files (x86)\NTP\binntpq -p PC06: timed out, nothing received ***Request timed out C:\Program Files (x86)\NTP\bin Here my configuration file: # NTP Network Time Protocol # ATTENTION : *You have to restart the NTP service when you change this file to activate the changes* # PLEASE CHECK THIS FILE CAREFULLY AND MODIFY IT IF REQUIRED # Configuration File created by Windows Binary Distribution Installer Rev.: 1.27 mbg # please check http://www.ntp.org for additional documentation and background information # The following restrict statements prevent that someone can abuse NTP as a traffic amplification tool by # ignoring mode 6 and mode 7 packets. Especially the monlist feature has a big potential to be abused for this. # See http://news.meinberg.de/244 for further information. restrict default nomodify notrap nopeer noquery # But allow local tools like ntpq full access: #restrict 127.0.0.1 That should be: restrict 127.0.0.1 # if you are using IPv6 on this machine, please uncomment the following lines: # restrict -6 default nomodify notrap nopeer noquery # restrict -6 ::1 Same again those should be: restrict -6 default nomodify notrap nopeer noquery restrict -6 ::1 David # Use drift file driftfile C:\Program Files (x86)\NTP\etc\ntp.drift # your local system clock, should be used as a backup # (this is only useful if you need to distribute time no matter how good or bad it is) server 127.127.1.0 # but it operates at a high stratum level to let the clients know and force them to # use any other timesource they may have. fudge 127.127.1.0 stratum 12 # Use a NTP server from the ntp pool project (see http://www.pool.ntp.org) # Please note that you need at least four different servers to be at least protected against # one falseticker. If you only rely on internet time, it is highly recommended to add # additional servers here. # The 'iburst' keyword speeds up initial synchronization, please check the documentation for more details! server 192.168.0.30 iburst server 192.168.0.31 iburst server 0.at.pool.ntp.org iburst server 1.at.pool.ntp.org iburst server 2.at.pool.ntp.org iburst server 1.de.pool.ntp.org iburst server 2.uk.pool.ntp.org iburst # End of generated ntp.conf --- Please edit this to suite your needs Hartmut ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Meinberg M200 remote monitoring
David Taylor wrote: On 27/05/2014 22:47, Jason Rabel wrote: I'm talking NTP only packets, not all packets. You can get that info from ntpdc -c iostats So you could parse that with a Perl script and use MRTG to monitor. BTW: I tried your command on my Windows compiled NTP but got no response received from either a Linux, FreeBSD or Windows system. But perhaps that's the default security. Same here $ ntpdc -c iostats localhost: timed out, nothing received but $ ntpq -c iostats time since reset:313782 receive buffers: 10 free receive buffers:9 . ntp-dev-4.2.7p444 NetBSD/6.1_STABLE David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP servers not accessible on some networks
Antonio Marcheselli wrote: On 21/05/2014 03:27, E-Mail Sent to this address will be added to the BlackLists wrote: Antonio Marcheselli wrote: Version is 4.2.4p (yes, I know. It's the same version I've been talking about and I cannot upgrade it unfortunately). When running ntpq -p I've got this xxx-2:/etc# ntpq -p remote refid st t when poll reach delay offset jitter 130.88.200.4 .INIT. 16 u- 64 0 0.000 0.000 0.000 xxx-2:/etc# ntpdate 130.88.200.4 20 May 23:30:11 ntpdate[16690]: no server suitable for synchronization found The same 130.88.200.4 works from other networks. It appears your client quries are not making it to the server, or answers from the server are not making it back to your client. Seems like an issue with your client PC, PC Firewall, ..., or client NTP .conf, or LAN Firewall / Router rules, or ISP Firewall / Router rules. If I keep pinging different pools, I can find another NTP server which replies. Seems strange, that would imply that the server 130.88.200.4 (or their ISP) is blocking your client? Hi, I had another NTP server setup, I stopped the NTP daemon, change the configuration to 130.88.200.4 and restarted it again. 16 is because the server has never been reached. The server can be ping'd of course. And it works as NTP from somewhere else. No issues with my side of the network, I end up on a router which I manage and has no special firewall rules in it. And again, other NTP servers do work. This has happened on a few sites around the UK. I'll post the ntp.conf later. in the meantime thanks for your help! That has been in the conf of one of my pool servers for years and it's not often that it's unreachable. I've changed isp several times, demon, zen and now aaisp. remote st t poll reach delay offset jitter +dir.mcc.ac.uk 2 u 256 377 28.576 3.438 0.135 I might still have a contact at mcc, a member of our computer club worked there, but I doubt that mcc are blocking you. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Handle ntp conf modification when ntp is already running
Arthur Lambert wrote: Hi, Thank you for all your answer. So in fact Jochen, even if I need for some reason to handle dynamic change on ntp.conf, you are telling me that it is cleaner and better to restart the daemon ? I am currently putting some modification in my ntp conf file thanks to tr69 protocols. Moreover due to security constraints it is very hard for me to restart the ntp daemon.. It is quite strange that noone try to patch ntp daemon to handle runtime modification on ntp conf. I also tried to use confi-from-file feature from ntpq without success. I add a ntp url in my ntp conf and run ntpq -c config-from-file /etc/ntp.conf. Then I am not able to see my new ntp url by running ntpq -p command. Hi I've just tried adding an extra server using config-from-file (ntp-dev-4.2.7p439 NetBSD-6) ntpq config-from-file ntp.conf_add.2014040901 Sending configurstion file, one line at a time. Keyid: 1 MD5 Password: Line No: 1 Config Succeeded: server -4 xxx.x.xx.xx minpoll 8 maxpoll 10 iburst Done sending file ntpq quit ntpq -p shows the added server remote refid st tpoll reach delay offset jitter +xxx.x.xx.xx x 2 u 193 256 7 22.334 2.349 0.113 David If I am able to create a clean patch to handle runtime modification I will be happy to share it. Regards, Arthur. 2014-04-09 5:34 GMT+02:00 E-Mail Sent to this address will be added to the BlackLists Null@blacklist.anitech-systems.invalid: On 4/8/2014 2:49 PM, William Unruh wrote: On 2014-04-08, Arthur Lambert wrote: -|-|-|-|-|-| I am currently using ntpd for my project. My need is to be able to use new ntp url when I put a new url in ntp.conf even if the ntp daemon is already running. Currently, I need to kill and reboot ntpd to be able to use the new ntp url set in my configuration file. i guess that my solution right now is to start ntpd in a hat process to be able to restart it if I detect a change in ntp conf file. Do I have really to restart ntpd to see new ntp url ? I tried to check option on ntpd to find a way to handle this case but I am not able to see this feature in the current implementation of ntpd You would likely need to use a fairly bleeding edge Dev Release. http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-dev/ http://archive.ntp.org/ntp4/ntp-dev/ e.g. Development 4.2.7p439 2014/04/03 http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-dev/ntp-dev-4.2.7p439.tar.gz http://archive.ntp.org/ntp4/ntp-dev/ntp-dev-4.2.7p439.tar.gz I believe you can tell ntpd anthing that ntp.conf would by using ntpq. :config I do not believe that there is a way of telling it to reread the .conf file. config-from-file filename I haven't tried either (yet). http://www.eecis.udel.edu/~mills/ntp/html/ntpq.html or e.g. {In the case of the dev ver I last downloaded} ntp-dev-4.2.7p418/html/ntpq.html See: Control-Message-Commands ntp-dev-4.2.7p418/ntpq/ntpq.html#Control-Message-Commands -- E-Mail Sent to this address blackl...@anitech-systems.com will be added to the BlackLists. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Handle ntp conf modification when ntp is already running
Arthur Lambert wrote: Hi, I am currently using ntpd for my project. My need is to be able to use new ntp url when I put a new url in ntp.conf even if the ntp daemon is already running. Currently, I need to kill and reboot ntpd to be able to use the new ntp url set in my configuration file. i guess that my solution right now is to start ntpd in a hat process to be able to restart it if I detect a change in ntp conf file. Do I have really to restart ntpd to see new ntp url ? I tried to check option on ntpd to find a way to handle this case but I am not able to see this feature in the current implementation of ntpd Hi I've lived with your problem since 1997 when I switched from mostly running chrony to mostly running ntp. I never saw it as a problem. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Reasons of NTP not to use GPS source
William Unruh wrote: On 2014-04-08, David Lord sn...@lordynet.org wrote: If you are lucky the serial port thresholds might be above ttl low and can be used without problem. Have you ever ( in the past 10 years) seen one that could not handle it? Hi Bill I've never tried but have specs for chips in different serial cards some of which can't handle ttl. On another issue, please stop using google to send your usenet posts. I've never used google I use nntpd? but I possibly don't clean up the posts I'm replying to, to your satisfaction :-) David Google adds a blank line between every line you quote even if both are blank lines. This makes replies rapidly unreadable. Perhaps they remove them in delivering them to you as well so you never notice the absolute mess that google makes of your posts. David Andy Everett TimeTools GPS-Referenced NTP Servers http://www.timetoolsglobal.com/information/gps-ntp-network-sync-products/ ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS problem
Simchaev Arthur-BAS071 wrote: Thank you Mike . I set flag3 to 1 and now I see PPSFREQ PPSTIME(but don't see PPSSIGNAL as you mentioned ) Perhaps because you are now only using the type 20 nmea driver? From the first post in this thread you were using the type 20 nmea driver for the time and the type 22 atom driver for pps. restrict 127.127.1.0 noquery nomodify notrap server 127.127.20.0 minpoll 4 maxpoll 4 iburst #NMEA Server server 127.127.22.0 prefer fudge 127.127.22.0 flag3 1 refid PPS The results I posted were from my own setup that uses the type 22 atom driver for pps. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS problem
Simchaev Arthur-BAS071 wrote: Hi David I have the following system : uname -a Linux am335x-evm 3.2.0-4.08 #5 Wed Mar 12 15:07:28 IST 2014 armv7l GNU/Linux And pps is existed in the kernel , when I run ppstest /dev/pps0 , I see the pps clock grown . Also ntpd shows that the server is PPS o. But I am confuse why I still don't see PPSFREQ,PPSTIME,PPSSIGNAL status . How I can be sure that my clock is synchronized to the PPS ? Regards Arthur I'm not at all familiar with recent ntpd on Linux and have never run an armv71 system and my oldest GPS is a Garmin GPS18xLVC. . On my systems cron jobs run /root/scripts/ntp/ntp-stat.sh at 6-10 minute intervals. ntpq -c lpeers: | Wed Apr 2 17:36:00 GMT 2014 | remote refid st t poll reach delay offset jitter | | -GPS_NMEA(2) .GPSb. 7 l 64 3770.000 -1.940 8.828 | oPPS(2) .PPSb. 0 l 16 3770.0000.000 0.004 | . ntpq -c kerninfo: | associd=0 status=011d leap_none, sync_pps, 1 event, kern, | pll offset:-0.000317 | pll frequency: -35.8115 | maximum error: 0.406 | estimated error: 3e-06 | kernel status: pll ppsfreq ppstime ppssignal nano | . also ntptime: | . | status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO), | . After I restart ntpd offset is sometimes 10ms when PPS kicks but then fairly quickly reduces to a few us. System load/local temperature changes give offset blips of 30us once a day from daily logging, with a larger blip at weekend from the weekly cron jobs. You can also check your wiring and circuitry used for the pps signal. I've tried input to printer port lpt0 which was no different to serial/DCD but you may have gpio which could be better if you have support compiled in. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS problem
Simchaev Arthur-BAS071 wrote: Hi Guys Thank you to your assistance . Seems is working now . I see that NMEA chosen as PPS peer server : remote refid st t when poll reach delay offset jitter == oGPS_NMEA(0) .GPS.0 l 12 16 3770.010 -0.030 0.031. But please clarify the following : 1) Can I sure that is update the system clock in PPS resolution 2) Why I still doesn't see PPSFREQ,PPSTIME,PPSSIGNAL , when I run ntptime . My output is following : ntptime ntp_gettime() returns code 0 (OK) time d6e78fed.18c23fa0 Thu, Apr 3 2014 7:44:45.096, (.096714581), maximum error 3888 us, estimated error 474 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 50.880 us, frequency -26.830 ppm, interval 1 s, maximum error 3888 us, estimated error 474 us, status 0x2001 (PLL,NANO), time constant 4, precision 0.001 us, tolerance 500 ppm. Hi Above looks as if you are synced to NMEA rather than PPS. What cpu, operating system and version are you using? For NetBSD-6/i386 I have to use a custom kernel to enable PPS. When I tried with Ubuntu-10/i386 I needed to install a pps package. David root@am335x-evm:/var/lib/ntp# ntpq -c as ind assid status conf reach auth condition last_event cnt === 1 65397 976a yes yes none pps.peersys_peer 6 root@am335x-evm:/var/lib/ntp# ntpq -c rv 65397 associd=65397 status=976a conf, reach, sel_pps.peer, 6 events, sys_peer, srcadr=GPS_NMEA(0), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00, stratum=0, precision=-20, rootdelay=0.000, rootdisp=0.000, refid=GPS, reftime=d6e79065.fffb1778 Thu, Apr 3 2014 7:46:45.999, rec=d6e79066.73ee526e Thu, Apr 3 2014 7:46:46.452, reach=377, unreach=0, hmode=3, pmode=4, hpoll=4, ppoll=4, headway=0, flash=00 ok, keyid=0, offset=0.054, delay=0.000, dispersion=0.262, jitter=0.031, filtdelay= 0.000.000.000.000.000.000.000.00, filtoffset=0.050.060.060.060.070.060.070.05, filtdisp= 0.030.270.510.750.991.231.471.71 3) Since I can attach only one GPS to the board ntp.conf is following : tos orphan 6 driftfile /var/lib/ntp/ntp.drift server 127.127.20.0 minpoll 4 iburst #NMEA Server fudge 127.127.20.0 flag1 1 flag2 0 time2 0.500 Regards Arthur -Original Message- From: questions-bounces+bas071=motorolasolutions@lists.ntp.org [mailto:questions-bounces+bas071=motorolasolutions@lists.ntp.org] On Behalf Of David Lord Sent: Wednesday, April 02, 2014 11:25 PM To: questions@lists.ntp.org Subject: Re: PPS problem David Lord wrote: . I currently use a Sure gps, ntp-dev-4.2.7p433 on NetBSD-6 I have a few significant differences in my ntp.conf # tos orphan 10 A few more comments tos orphan 10 # is to replace your three lines: server 127.127.1.0 #lo server fudge 127.127.1.0 stratum 7 restrict 127.127.1.0 noquery nomodify notrap tos mindist 0.4 # allows pps to kick in ^^^ server 127.127.20.2 mode 18 You can use this as prefer peer: server 127.127.20.0 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb Required value for time2 will depend on your GPS model and firmware version. server 127.127.22.2 minpoll 4 maxpoll 4 server 127.127.22.2 flag2 0 flag3 1 refid PPSb server -4 ntp0.mydomain server -4 ntp1.myisp minpoll 8 maxpoll 10 iburst prefer For what it's worth the last entry in my /var/log/ntp-stat.20140402: Wed Apr 2 17:36:00 GMT 2014 remote refid st t poll reach delay offset jitter -GPS_NMEA(2) .GPSb. 7 l 64 3770.000 -1.940 8.828 oPPS(2) .PPSb. 0 l 16 3770.0000.000 0.004 +ns0.lordyne 81.187 3 u 64 3771.363 -0.175 0.202 ns2.lordyne 192.16 2 u 64 3770.498 -0.237 0.613 +ns1.lordyne 81.187 3 u 64 3770.5770.007 0.703 +ns3.lordyne 81.187 3 u 64 3770.849 -0.486 0.690 *ntp1.xx 195.66 2 u 256 377 19.589 -0.943 0.403 associd=0 status=011d leap_none, sync_pps, 1 event, kern, pll offset:-0.000317 pll frequency: -35.8115 maximum error: 0.406 estimated error: 3e-06 kernel status: pll ppsfreq ppstime ppssignal nano pll time constant: 4 precision: 1e-06 frequency tolerance: 495.911 pps frequency: -35.8115 pps stability: 0.00480652 pps jitter:0.002 calibration interval 256 calibration cycles:6087 jitter exceeded: 7635 stability exceeded:0 calibration errors:20 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset -0.317 us, frequency -35.812 ppm, interval 256 s, maximum error 406000 us, estimated error 3 us, status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO
Re: [ntp:questions] PPS problem
Simchaev Arthur-BAS071 wrote: Hi . Could you please help me with the following problem ? Our board supports PPS NTP . I connect define the Garmin GPS(GPS16x-HVS) as the NMEA reference clock . Unfortunately when I add the atom reference clock to ntp in order to receive pps , after sometime NMEA ATOM(pps) clocks marked as falsetick servers . I see that it can related to the jitter and can be fixed by setserial low_latency . But out UART doesn't support this flag . Therefore could you please explain how I can fix servers falsetick problem witout use setserial . Maybe the problem related to number of the servers (I use only only 2 stratum 0 servers which take the data from the same GPS device ) Our configuration is following : Ntp configuration (ntpd 4.2.6p5) : server 127.127.1.0 #lo server fudge 127.127.1.0 stratum 7 restrict 127.127.1.0 noquery nomodify notrap server 127.127.20.0 minpoll 4 maxpoll 4 iburst #NMEA Server server 127.127.22.0 prefer fudge 127.127.22.0 flag3 1 refid PPS I currently use a Sure gps, ntp-dev-4.2.7p433 on NetBSD-6 I have a few significant differences in my ntp.conf # tos orphan 10 tos mindist 0.4 # allows pps to kick in ^^^ server 127.127.20.2 mode 18 fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 server 127.127.22.2 flag2 0 flag3 1 refid PPSb server -4 ntp0.mydomain server -4 ntp1.myisp minpoll 8 maxpoll 10 iburst prefer ## If not using extra server use 127.127.20.0 as prefer peer. David ntpq -p remote refid st t when poll reach delay offset jitter == *LOCAL(0).LOCL. 7 l5 64 3770.0000.000 0.031 xGPS_NMEA(0) .GPS.0 l4 16 3770.000 -63.203 5.256 xPPS(0) .PPS.0 l3 64 3770.000 -347.47 7.428 root@am335x-evm:/dev# ntpdc ntpdc kerninfo pll offset: 0 s pll frequency:0.000 ppm maximum error:0.013456 s estimated error: 1e-05 s status: 2007 pll ppsfreq ppstime nano pll time constant:6 precision:1e-09 s frequency tolerance: 500 ppm root@am335x-evm:/dev# ntptime ntp_gettime() returns code 0 (OK) time d6dd71e6.aaf4cf0c Wed, Mar 26 2014 15:33:58.667, (.667798707), maximum error 23956 us, estimated error 10 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset 0.000 us, frequency 0.000 ppm, interval 1 s, maximum error 23956 us, estimated error 10 us, status 0x2007 (PLL,PPSFREQ,PPSTIME,NANO), time constant 6, precision 0.001 us, tolerance 500 ppm, Regards Arthur ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS problem
David Lord wrote: . I currently use a Sure gps, ntp-dev-4.2.7p433 on NetBSD-6 I have a few significant differences in my ntp.conf # tos orphan 10 A few more comments tos orphan 10 # is to replace your three lines: server 127.127.1.0 #lo server fudge 127.127.1.0 stratum 7 restrict 127.127.1.0 noquery nomodify notrap tos mindist 0.4 # allows pps to kick in ^^^ server 127.127.20.2 mode 18 You can use this as prefer peer: server 127.127.20.0 prefer fudge 127.127.20.2 stratum 7 time2 0.407 flag1 0 refid GPSb Required value for time2 will depend on your GPS model and firmware version. server 127.127.22.2 minpoll 4 maxpoll 4 server 127.127.22.2 flag2 0 flag3 1 refid PPSb server -4 ntp0.mydomain server -4 ntp1.myisp minpoll 8 maxpoll 10 iburst prefer For what it's worth the last entry in my /var/log/ntp-stat.20140402: Wed Apr 2 17:36:00 GMT 2014 remote refid st t poll reach delay offset jitter -GPS_NMEA(2) .GPSb. 7 l 64 3770.000 -1.940 8.828 oPPS(2) .PPSb. 0 l 16 3770.0000.000 0.004 +ns0.lordyne 81.187 3 u 64 3771.363 -0.175 0.202 ns2.lordyne 192.16 2 u 64 3770.498 -0.237 0.613 +ns1.lordyne 81.187 3 u 64 3770.5770.007 0.703 +ns3.lordyne 81.187 3 u 64 3770.849 -0.486 0.690 *ntp1.xx 195.66 2 u 256 377 19.589 -0.943 0.403 associd=0 status=011d leap_none, sync_pps, 1 event, kern, pll offset:-0.000317 pll frequency: -35.8115 maximum error: 0.406 estimated error: 3e-06 kernel status: pll ppsfreq ppstime ppssignal nano pll time constant: 4 precision: 1e-06 frequency tolerance: 495.911 pps frequency: -35.8115 pps stability: 0.00480652 pps jitter:0.002 calibration interval 256 calibration cycles:6087 jitter exceeded: 7635 stability exceeded:0 calibration errors:20 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset -0.317 us, frequency -35.812 ppm, interval 256 s, maximum error 406000 us, estimated error 3 us, status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO), time constant 4, precision 0.001 us, tolerance 496 ppm, pps frequency -35.812 ppm, stability 0.005 ppm, jitter 1.500 us, intervals 6087, jitter exceeded 7635, stability exceeded 0, errors 20. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Problem facing with Ntp client Configuration
William Unruh wrote: On 2014-03-27, David Lord sn...@lordynet.org wrote: William Unruh wrote: On 2014-03-27, David Lord sn...@lordynet.org wrote: Biswajit Panigrahi wrote: Hi Mayer, I have done the required changes. I have found one problem regarding condition field in ntpq When ever I have restarted ntpd on client and executed ntpq as atcafs-n11s2:~# ntpq ntpq as ind assid status conf reach auth condition last_event cnt === 1 45503 9044 yes yes nonereject reachable 4 Condition field shows reject for more then 15 to 20 minute then after it changes to sys.peer after then only sync happens. I have opened the port 123 for ntp. Still it shows reject Please let me know reason for this to fix the issue Why do you believe there is an issue to be fixed? Ntpd takes a certain amount of time to sync after a restart. You could add a few more ntp sources. Three sources are not enough, four is good, five is safer. Why not 4397523 servers? Even better. Why not read up on what ntpd does and cannot do? I'm sure you knew the answer before you posted that? Yes. Argument through hyperbole. There is an argument for more than 1 sever, but you should recognize what that argument is. Three are more than enough(that guards against one going crazy.) If you really think that there is chance that more than one will go crazy 5 is good, but if there is resonable chance of 2 going crazy, then the probabilities become high that more than 2 will as well, at which point you enter an arena of dimishing returns. You need to fix your sources, not rely on more and more servers. So, one is fine, recognizing that there is no way of noticing if that one goes crazy. Two are no better than one, and have the danger of hopping from one to the other if one goes crazy, so three is a protection against one going crazy. If it is more than that, you have problems that needs a human to fix. It is true that hard disks have almost half of the bits being parity bits, but they also impliment a rather more sophisticated error identification and correction algorithm than does ntpd. The docs on intersection give an example of when three sources is not enough and that is why I picked five. One of my servers currently has an unreachable source so it's still able to make a selection. It's not unknown that I lose two sources in which case that server will get kicked out of the pool rotation. David And if one of your sources is going crazy, ntpd should send you a message to that effect so you can fix it, or use a different server. bye David Use 1 if you want. The problem is, what if that one goes down or goes crazy. If it is yours fix it. If not, use another. 3 guards against one going crazy. As you up the numbers you guard against more and more going crazy. But since the probability of one going crazy is low, you may just decide to live with it. One of my servers, ntp-dev 4.2.7p433, was restarted on Mar 15: time remote st reach offset 18:36 oPPS 0377 -0.001 reboot 18:42 PPS 0 00.000 18:48 oPPS 0 37 -60.233 18:54 oPPS 0377 -0.004 19:00 oPPS 0377 -0.001 Other servers without pps take a few minutes longer to sync. It depends on the poll interval. pps has a 16 second poll interval. Most others have a 64 sec initial poll interval, simply so as to not put to much stress on the server. If it is your own server you can stress it all you are comfortable with. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntpd access restrictions: Server allowed works only with ipaddress
Witt, Stefan wrote: Hello, looking for an answer of the following misbehaviour: Server entries are only valid and accepted if I use ip-address and not if I user fqdn of the timeserver1/2! Resolving of Timeserver-fqdn is successful! Do anybody have an explanation of this unexpected behavior? the ntp.conf looks quite like that: ## restrict 0.0.0.0 mask 0.0.0.0 nomodify nopeer ## # driftfile ist sehr empfehlenswert wg. Reboot-Situationen driftfile /etc/inet/ntp.drift server 127.127.1.1 fudge 127.127.1.1 stratum 5 ### internal timeserver: ##server fqdn-timeserver1 prefer ##server fqdn-timeserver2 # internal timeserver: server ipv4-adress-timeserver1 prefer server ipv4-adress-timeserver2 # Hi I don't really understand your ntp.conf Ntp works with ip addresses because fqdn can sometimes map to more than one ip address. ntp.conf from one of my systems: ### # 20140118 restrict -6 default limited nomodify notrap nopeer noquery restrict -4 default limited nomodify notrap nopeer noquery restrict source restrict -6 my ipv6 address block restrict -4 my ipv4 address block and mask restrict -6 ::1 restrict 127.0.0.1 mask 255.255.255.255 pidfile/var/run/ntpd.pid driftfile /var/db/ntp/ntpd.drift keys /etc/ntp/ntp.keys logfile/var/log/ntp/ntp.log logconfig +allsync +allclock keysdir/etc/ntp/keys statsdir /var/log/ntp/stats statistics loopstats peerstats sysstats filegen loopstats file loopstats type day link enable filegen peerstats file loopstats type day link enable filegen sysstats file sysstats type day link enable trusted key 1 2 3 4 5 request key 1 control key 1 tos minsane 3 tos orphan 12 tos mindist 0.03 peer -4 a_local_pcminpoll 4 maxpoll 6 iburst server -4 a_local_pc2 minpoll 4 maxpoll 6 iburst prefer server -4 ntp0.mydomain2 minpoll 6 maxpoll 8 iburst server -4 ntp1.mydomain minpoll 6 maxpoll 8 iburst server -4 ntp2.mydomain2 minpoll 6 maxpoll 8 iburst server -4 ntp3.(mydomain minpoll 6 maxpoll 8 iburst I lost ipv6 in 2012 for various reasons (network/pcs meltdown) and not yet got it back. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Problem facing with Ntp client Configuration
Biswajit Panigrahi wrote: Hi Mayer, I have done the required changes. I have found one problem regarding condition field in ntpq When ever I have restarted ntpd on client and executed ntpq as atcafs-n11s2:~# ntpq ntpq as ind assid status conf reach auth condition last_event cnt === 1 45503 9044 yes yes nonereject reachable 4 Condition field shows reject for more then 15 to 20 minute then after it changes to sys.peer after then only sync happens. I have opened the port 123 for ntp. Still it shows reject Please let me know reason for this to fix the issue Why do you believe there is an issue to be fixed? Ntpd takes a certain amount of time to sync after a restart. You could add a few more ntp sources. Three sources are not enough, four is good, five is safer. One of my servers, ntp-dev 4.2.7p433, was restarted on Mar 15: time remote st reach offset 18:36 oPPS 0377 -0.001 reboot 18:42 PPS 0 00.000 18:48 oPPS 0 37 -60.233 18:54 oPPS 0377 -0.004 19:00 oPPS 0377 -0.001 Other servers without pps take a few minutes longer to sync. David Regards, Biswajit -Original Message- From: Danny Mayer [mailto:ma...@ntp.org] Sent: Tuesday, March 25, 2014 9:44 PM To: Biswajit Panigrahi; questions@lists.ntp.org Subject: Re: Problem facing with Ntp client Configuration On 3/25/2014 8:35 AM, Biswajit Panigrahi wrote: Hi All, When ever I configure ntp client ,then its takes more time even if 7minute to 8 minute difference is there between client and server. Please provide me the configuration which will sync within less time. Currently ntp.drift file is empty.shall we need to modify the same? Current NTP Client configuration is : server 10.16.188.254 Add iburst to this line. Since this is an internal server can you add any more NTP servers? One is not a good number 3 is good and 4 is better. Never use 2. server 127.127.1.0 fudge 127.127.1.0 stratum 10 Get rid of these last two lines. Unless the ntp client is serving time elsewhere it's not needed. restrict 10.16.188.254 mask 255.255.255.255 nomodify notrap noquery restrict 127.0.0.1 broadcastclient novolley broadcastdelay 0 keys /var/ntp/keys logfile /var/log/ntp/ntpd.log driftfile /var/log/ntp/ntp.drift statsdir /var/log/ntp/ statistics loopstats peerstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. Not any more. This is a public mailing list and this message is now available through Google search. Danny Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Problem facing with Ntp client Configuration
William Unruh wrote: On 2014-03-27, David Lord sn...@lordynet.org wrote: Biswajit Panigrahi wrote: Hi Mayer, I have done the required changes. I have found one problem regarding condition field in ntpq When ever I have restarted ntpd on client and executed ntpq as atcafs-n11s2:~# ntpq ntpq as ind assid status conf reach auth condition last_event cnt === 1 45503 9044 yes yes nonereject reachable 4 Condition field shows reject for more then 15 to 20 minute then after it changes to sys.peer after then only sync happens. I have opened the port 123 for ntp. Still it shows reject Please let me know reason for this to fix the issue Why do you believe there is an issue to be fixed? Ntpd takes a certain amount of time to sync after a restart. You could add a few more ntp sources. Three sources are not enough, four is good, five is safer. Why not 4397523 servers? Even better. Why not read up on what ntpd does and cannot do? I'm sure you knew the answer before you posted that? bye David Use 1 if you want. The problem is, what if that one goes down or goes crazy. If it is yours fix it. If not, use another. 3 guards against one going crazy. As you up the numbers you guard against more and more going crazy. But since the probability of one going crazy is low, you may just decide to live with it. One of my servers, ntp-dev 4.2.7p433, was restarted on Mar 15: time remote st reach offset 18:36 oPPS 0377 -0.001 reboot 18:42 PPS 0 00.000 18:48 oPPS 0 37 -60.233 18:54 oPPS 0377 -0.004 19:00 oPPS 0377 -0.001 Other servers without pps take a few minutes longer to sync. It depends on the poll interval. pps has a 16 second poll interval. Most others have a 64 sec initial poll interval, simply so as to not put to much stress on the server. If it is your own server you can stress it all you are comfortable with. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Problem facing with Ntp client Configuration
Biswajit Panigrahi wrote: Hi All, When ever I configure ntp client ,then its takes more time even if 7minute to 8 minute difference is there between client and server. Please provide me the configuration which will sync within less time. Currently ntp.drift file is empty.shall we need to modify the same? My ntpd startup scripts still use ntpdate to preset the time but you can also try ntpd -g -q. The drift file is only populated when ntpd has an idea of what the value should be. When using a good drift file my servers are usually within 1 ms offset after about 15 minutes (ntpd 4.2.7p433). David Current NTP Client configuration is : server 10.16.188.254 server 127.127.1.0 fudge 127.127.1.0 stratum 10 restrict 10.16.188.254 mask 255.255.255.255 nomodify notrap noquery restrict 127.0.0.1 broadcastclient novolley broadcastdelay 0 keys /var/ntp/keys logfile /var/log/ntp/ntpd.log driftfile /var/log/ntp/ntp.drift statsdir /var/log/ntp/ statistics loopstats peerstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Atom PPS with parallel port
Rob wrote: I would like to use the Atom driver (22) on a Linux system with a parallel port. It is not clear to me from the scattered info I have found on internet if this is going to work. Using a modern Linux kernel with the PPS module, is it possible to symlink /dev/pps0 to a parallel port device and then connect the PPS signal to the ACK input (pin 10)? If not, what else is required to get this working? Examples always refer to the use of a serial port DCD input, but for best accuracy (in the microsecond range) I think the parallel port is better. (no RS232 drivers/receivers, no funny UART that may delay interrupts) Any other suggestions for an accurate PPS input? On NetBSD with stock ntpd, pre 2010, I did comparisons of pps from Sure GPS with output from dcd at ttl level vs the serial dcd but didn't really see any consistent difference. From loop_summary the rms offsets from either would be 4-6 us due to temperature changes (ambient and from system load) with peaks of 30-100us otherwise rms offset would have been significantly lower. Weekly log on Saturdays gives an additional and larger peak. loopstats range(us) rms 201402199+/-38.6 4.5 201402207+/-37.9 4.5 201402219+/-39.1 4.6 20140222 20+/-49.2 6.2 I just symlinked from lpt to pps but not certain if I needed to set a flag in ntp.conf. I also used this to compare two pps signals, serial vs parallel one marked noselect. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Atom PPS with parallel port
Rob wrote: David Lord sn...@lordynet.org wrote: Rob wrote: I would like to use the Atom driver (22) on a Linux system with a parallel port. It is not clear to me from the scattered info I have found on internet if this is going to work. Using a modern Linux kernel with the PPS module, is it possible to symlink /dev/pps0 to a parallel port device and then connect the PPS signal to the ACK input (pin 10)? If not, what else is required to get this working? Examples always refer to the use of a serial port DCD input, but for best accuracy (in the microsecond range) I think the parallel port is better. (no RS232 drivers/receivers, no funny UART that may delay interrupts) Any other suggestions for an accurate PPS input? On NetBSD with stock ntpd, pre 2010, I did comparisons of pps from Sure GPS with output from dcd at ttl level vs the serial dcd but didn't really see any consistent difference. Did you try the parallel port? I am interested not only in jitter but also in any constant offset between the PPS pulses and system time on different systems (possibly using different makes of serial card). 4-6 us would be good enough for my purpose, but it would not be good when one system had a 10us offset because of a propagation delay in a linedriver/receiver. Yes, and from archived ntp.conf at that time /dev/pps* at ppbus but I also tried without ppbus and had a symlink to /dev/lpt* For past couple of years I have pps2 - /dev/tty00 and there is no ppbus in my recent kernels so I guess it was from a custom kernel. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Atom PPS with parallel port
William Unruh wrote: On 2014-02-23, David Lord sn...@lordynet.org wrote: Rob wrote: I would like to use the Atom driver (22) on a Linux system with a parallel port. It is not clear to me from the scattered info I have found on internet if this is going to work. Using a modern Linux kernel with the PPS module, is it possible to symlink /dev/pps0 to a parallel port device and then connect the PPS signal to the ACK input (pin 10)? If not, what else is required to get this working? Examples always refer to the use of a serial port DCD input, but for best accuracy (in the microsecond range) I think the parallel port is better. (no RS232 drivers/receivers, no funny UART that may delay interrupts) Any other suggestions for an accurate PPS input? On NetBSD with stock ntpd, pre 2010, I did comparisons of pps from Sure GPS with output from dcd at ttl level vs the serial dcd but didn't really see any consistent difference. From loop_summary the rms offsets from either would be 4-6 us due to temperature changes (ambient and from system load) with peaks of 30-100us otherwise rms offset would have been significantly lower. Weekly log on Saturdays gives an additional and larger peak. loopstats range(us) rms 201402199+/-38.6 4.5 201402207+/-37.9 4.5 201402219+/-39.1 4.6 20140222 20+/-49.2 6.2 I just symlinked from lpt to pps but not certain if I needed to set a flag in ntp.conf. I also used this to compare two pps signals, serial vs parallel one marked noselect. The problem with trying to compare interrupts from two different sources on a single machine is that there will be something like a 10us difference always simply because the first interrupt processed has to read the clock to timestamp the interrupt before the interrupts are released and then the interrupt handling routine has to send the second interrupt to the relevant program for processing before the second can process. As I said when I did this I found about a 10us delay between the two interrupt processings. I was testing some homebrew xtal oscillators that were divided down to give around 1 Hz. They were sometimes at a stable offset and varied within a range of 10 ms but other days the would have gained or lost a second or more. For comparing different PPS outputs at least one of my receivers has a presettable offset that can then be fudged out by ntpd so avoiding interrupts being too close together. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] status information after ntpd -q
joeri delvoy wrote: does sntp force the time of the system clock automatically when run as root, or do you need to add an optional parameter to do so? You need the descriptions for the exact ntpd release for your platform. eg. NetBSD-6 i386, ntp-dev-4.2.7p410 By default sntp displays the clock offset but does not attempt to correct it. -S, --step directly sets the clock to the corrected time -s, --slew offset correction by slewing using adjtime{} I've no recent experience of using sntp, last time used was on DOS (ND7) but from a local server running chrony with time set from an infrequent dialup connection. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] status information after ntpd -q
joeri delvoy wrote: the reason why i ask this, is because if i execute the sntp command several times, the offset remains around -621 : 4 Feb 15:25:33 sntp[19682]: Started sntp 2014-02-04 15:25:33.880851 (+) -621.641757 +/- 0.053009 secs 4 Feb 15:28:24 sntp[19727]: Started sntp 2014-02-04 15:28:24.620626 (+) -621.655449 +/- 0.035538 secs that might be because either: sntp wasn't called with the correct options user doesn't have privileges to set the clock David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntpdc and collectd queries timeout
michalpurzyns...@gmail.com wrote: Hello. The ntpdc queries timeout every time on the NTP version ntp-dev-4.2.7p411 (compiled myself). Looks like the type 7 packets are blocked from localhost but I don't know why. The same queries work on the 4.2.6 (distribution version, Debian). I test it like this - here's a query result on 4.2.6 root@raspberrypi:~# ntpdc -c kern pll offset: -0.024376 s pll frequency:-49.895 ppm maximum error:0.0039681 s estimated error: 8.071e-06 s status: 2001 pll nano pll time constant:4 precision:1e-09 s frequency tolerance: 500 ppm And the query on 4.2.7p411, with the same configuration file root@raspberrypi:~# ntpdc -c kern localhost: timed out, nothing received ***Request timed out On NetBSD-6 i386 ntp-dev-4.2.7p410 $ ntpdc -c kern localhost: timed out, nothing received ***Request timed out Perhaps that is intended behavior for 2014 given recent DDOS attacks? David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ntpdc and collectd queries timeout
Steve Kostecke wrote: On 2014-01-24, David Lord sn...@lordynet.org wrote: On NetBSD-6 i386 ntp-dev-4.2.7p410 $ ntpdc -c kern localhost: timed out, nothing received ***Request timed out Perhaps that is intended behavior for 2014 given recent DDOS attacks? According to http://archive.ntp.org/ntp4/ChangeLog-dev mode 7 requests were disabled more than 2 years ago: (4.2.7p230) 2011/11/01 Released by Harlan Stenn st...@ntp.org * Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is believed to provide all functionality ntpdc did, and uses a less- fragile protocol that's safer and easier to maintain. If you do find some management via ntpdc is needed, you can use enable mode7 in the ntpd configuration. Before joining the pool in 2009 I'd changed most of my monitoring scripts to use ntpq rather than ntpdc. $ ntpq -c kerninfo me6000e associd=0 status=011d leap_none, sync_pps, 1 event, kern, pll offset: -0.000148 pll frequency: David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] better rate limiting against amplification attacks?
Steve Kostecke wrote: On 2014-01-16, Greg Troxel g...@ir.bbn.com wrote: Harlan Stenn st...@ntp.org writes: William Unruh writes: I do not mean the default in the config file, I mean the default if there is no config file or if nothing is set in the config file. Then ntpd won't connect to anything and there will be no data to report. This is a ridiculous strawman. The ntp project is abdicating its responsibility to provide sane default behavior by claiming that no default behavior can make everyone happy and therefore it's not their fault. The notion that OS packagers somehow have a better idea of usage is also specious. Really, ntpd should, when run with a config file of only server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org behave relatively sanely, including declining to respond to packets that could be amplification attacks, The majority use case for ntpd is to synchronize your clock to UTC (i.e. a leaf-node client). So an ntpd ought to have the following defaults: driftfile /path/to/ntp.drift pool pool.ntp.org iburst restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery restrict 127.0.0.1 restrict ::1 This would enable the majority use case without the need for a configuration file. hi I have restrict -4 limited kod nomodify notrap nopeer noquery I've not checked most recent docs but thought limited was needed for kod. There were also some posts indicating that kod could be counter productive leading to self inflicted DOS. David while being usable as a s2/s3 to other nearby nodes. Operation as a LAN time server is probably a secondary use case. But the defaults listed above would also enable that usage. This notion of good behavior under minimal config seems really obvious to me, yet there is a huge resistance to it, with the notion that every end user should invest the time to be an expert. This. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] enable pps not working from ntp.conf
Dennis Golden wrote: On Wed, 08 Jan 2014 17:46:26 +, David Taylor wrote: On 07/01/2014 16:55, Dennis Golden wrote: I have searched to find an answer to this problem with no success. I am using the oncore clock (127.127.30.0) and have included enable pps in ntp.conf, but I get the following in /var/log messages: line 59 column 8 syntax error, unexpected T_String syntax error in /etc/ntp.conf line 59, column 8 I can use ntpdc to set this option with no problem. Any ideas? TIA, Dennis Likely it's not related, but I was just playing with a new system (Raspberry Pi) and I had told NTP that a leap file was present, when I hadn't yet created it. This is copying the ntp.conf from one system to another. NTP worked, except the PPS didn't work when the system booted. Restart NTP and the PPS worked perfectly. I didn't put two and two together until I added the leap-second file, and NTP started correctly at boot time. The reference was right at the end of ntp.conf So this suggests that NTP can parse so far down ntp.conf and get those things working, but when it finds an error, it stops other things working. So maybe your error was causing a similar effect. This with ntp 4.2.7p410 on Raspberry Pi with a derivative of Debian Wheezy, I believe. Thanks to all for your responses. I still don't understand why enable pps using ntpdc appears to work and shows up in the logs, but I'm not sure it does anything from looking at the source (ntp-4.2.6p5). Since consensus says that it's not supported, I'm not going to worry about it. Correlating the information from other servers, it appears that pps is working. On NetBSD-6 my Sure evaluation board and ntp-dev-4.2.7p401 using atom with nmea drivers - $ ntpq -p remoterefid st t poll reach offset jitter -GPS-NMEA(2) .GPSb. 7 l 64 377 -6.821 8.756 oPPS(2) .PPSb. 0 l 16 377 -0.001 0.004 . $ ntpq -c rv ., sync_pps, . $ ntptime . offset -0.893 us, . maximum error 402500 us, estimated error 1 us, status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO), . So it is clear enough for me that PPS is working. David Regards, Dennis ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] enable pps not working from ntp.conf
Dennis Golden wrote: I have searched to find an answer to this problem with no success. I am using the oncore clock (127.127.30.0) and have included enable pps in ntp.conf, but I get the following in /var/log messages: line 59 column 8 syntax error, unexpected T_String syntax error in /etc/ntp.conf line 59, column 8 I can use ntpdc to set this option with no problem. Hi I have an oncore??? that I've never tried. My sources for ntp-dev-4.2.7p401 don't seem to have any code for oncore.pps.n whilst it is present in 4.2.6p5. My couple of suggestions are: (1) symlink from the serial port device to /dev/oncore.pps.n (2) try the Atom + nmea drivers as alternative The oncore driver seems to allow a selectable skew so that several pps devices can run at the same time so you'd lose that functionality. David Any ideas? TIA, Dennis ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Determine from logfiles if PPS/NMEA was discarded?
Ralph Aichinger wrote: I've had to rebuild my NTP server, and have had problems of ntp somehow losing the GPS with offsets of 1 second (wrong side of the PPS) and/or huge (100ms+) sporadic jitters since. I'm not sure if I've solved it, but configuring out unneded sentences, fiddling with time2 (400ms now) seems to have vastly improved it, or solved it completely. Is there a way to find out afterwards, if the NMEA has had a problem (e.g. tally x discarded by intersection algorithm, or losing the o of the PPS signal in peer display) while I was not looking? The peerstats/clockstats file is a bit cryptic to me. Thanks in advance, /ralph I use peer_summary and loop_summary but they are not suitable for diplaying short term glitches. I also have a crontab */6 * * * * /bin/sh /root/scripts/ntp/ntp_stat.sh Fri Jan 3 12:54:00 GMT 2014 remote refid st t when poll reach delay offset jitter = -GPS_NMEA(2) .GPSb. 7 l7 64 3770.000 -23.293 5.274 oPPS(2) .PPSb. 0 l6 16 3770.000 -0.005 0.004 +ns0.lordynet 81.187.61 3 u 60 64 3771.5920.442 0.586 ns2.lordynet 192.168.5 2 u 26 64 3770.665 -0.179 0.406 +ns1.lordynet 81.187.61 3 u 18 64 3770.6420.290 0.557 +ns3.lordynet 81.187.61 3 u 34 64 3770.8250.263 0.658 *ntp1.xxx 195.66.24 2 u 41 256 377 23.172 -0.069 0.465 ntp_gettime() returns code 0 (OK) time d6713169.300d801c Fri, Jan 3 2014 12:54:01.187, (.187706104), maximum error 403500 us, estimated error 2 us, TAI offset 35 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset -5.040 us, frequency -36.693 ppm, interval 256 s, maximum error 403500 us, estimated error 2 us, status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO), time constant 4, precision 0.001 us, tolerance 496 ppm, pps frequency -36.693 ppm, stability 0.021 ppm, jitter 2.800 us, intervals 1030, jitter exceeded 877, stability exceeded 0, errors 3. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS signal from Garmin GPS 18x LVC
Hal Murray wrote: In article 4fh6pa-869@ns2.lordynet.org.uk, David Lord sn...@lordynet.org writes: I'm using NetBSD with ntpd 4.2.7p401 and type 22 driver for PPS but I found I needed On my setup, if pps isn't picked up within some short period it's likely not synced at all. I usually reboot which seems to always lock to pps within a few minutes, rather than try restarting ntpd which sometimes never syncs to pps. There is a bug in the NetBSD kernel. Once ntpd uses PPS, it's all used up. Restarting ntpd won't be able to use it again. Rebooting fixes it. Ouch I'll investigate David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] PPS signal from Garmin GPS 18x LVC
Adrian P wrote: Thank you very much David! So o means PPS is used... In my case, I only have * in front of the driver IP So I suppose NTP is not using the PPS signal... hmm, wondering why. This is my output: server 127.127.20.0 mode 1 minpoll 4 maxpoll 4 prefer fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 refid PPS root@debian:~# ntpq -crv -pn associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync, version=ntpd 4.2.6p5@1.2349-o Sat May 12 09:07:18 UTC 2012 (1), processor=i686, system=Linux/3.2.0-4-686-pae, leap=00, stratum=1, precision=-19, rootdelay=0.000, rootdisp=39.519, refid=PPS, reftime=d66ab9bb.59e07233 Sun, Dec 29 2013 17:09:47.351, clock=d66ab9ca.45e6469f Sun, Dec 29 2013 17:10:02.273, peer=52263, tc=4, mintc=3, offset=14.437, frequency=50.557, sys_jitter=23.063, clk_jitter=19.669, clk_wander=5.553 remote refid st t when poll reach delay offset jitter == *127.127.20.0.PPS.0 l 15 16 3770.000 14.437 23.063 root@debian:~# This is a Debian linux that I am using right now , and ppswatch is telling me that PPS signal is present: I'm using NetBSD with ntpd 4.2.7p401 and type 22 driver for PPS but I found I needed tos mindist 0.4 to ensure pps was picked up. I probably could get away with a lower value but my Sure gps type 20 driver is showing offset of about 20ms rms and 80 ms pk. ntpq -crv gives sync_pps, refid=PPSb, offset=-0.001413. When I tried with Ubuntu sometime during 2009 I had to install the ppskit package but doubt that is needed now. On my setup, if pps isn't picked up within some short period it's likely not synced at all. I usually reboot which seems to always lock to pps within a few minutes, rather than try restarting ntpd which sometimes never syncs to pps. another David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Bounce attack via pool server
Jure Sah wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I am an administrator of a public NTP server joined to pool.ntp.org. Our server has recently been an unwilling party to a NTP UDP based bounce attack and have received the report attached below. I would like to continue offering my server in the pool, but I would also like to secure my server configuration to prevent such attacks in the future. I am unsure as to what exactly to do, as some of what is suggested below (for example, turning off UDP support on the time server) would most likely result in problems for pool users, if not invalidate my NTP server for use in the pool altogether. I would like my server to still be as useful as possible for everybody. I am using ntpd version 4.2.6p3. I have searched trough the www.pool.ntp.org website on the subject and could not find any general recommendation for a secure setup, however I might not have been looking in the right places. Could anyone please help? I've recently added noquery to my ntp.conf: restrict default limited kod nomodify notrap nopeer noquery other suggestions are that kod might be a bad idea. David LP, Jure ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server with Garmin GPS 18 LVC
Harlan Stenn wrote: David Lord writes: If ntpd is throwing away 7 out of 8 polls I'd say their results could be similar to mine. ntpd doesn't throw away 7 out of 8 polls, Bill just likes to say that. ntpd chooses the best data it sees (for its definition of best) and uses those. I should have included a smiley :-) Even though the CPU is a 133 MHz 486 class I am surprised at the level of jitter shown on the graph for the serial port. I'm using a 600 MHz via epia-m with serial PPS derived from TTL out from the GPS. associd=0 status=011d leap none, sync_pps, 1 event, kern, version=ntpd 4.2.7p401@1.2483-o Sat Nov 30 16:37:14 UTC 2013 (1), processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, precision=-17, rootdelay=0.000, rootdisp=400.195, refid=PPSb, reftime=d65eab4f.536dbb62 Fri, Dec 20 2013 11:41:03.325, clock=d65eab5c.806d7623 Fri, Dec 20 2013 11:41:16.501, peer=9782, tc=4, mintc=3, 0ffset=-0.001152, frequency=-36.989, sys_jitter=0.007629, clk_jitter=0.002, clk_wander=0.001, tai=35, leapsec=20120701, expire=20140628 David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server with Garmin GPS 18 LVC
Adrian P wrote: . Everywhere is written that FreeBSD is the best OS for time keeper, since its kernel supports nanosecond accuracies. However, if GPS 18x LVC PPS signal has only microsecond accuracy, then I suppose there is no point on using FreeBSD, any linux would be okay as well. So what do you think, looking from NTP point of view only, is this nanosecond accuracy the only reason why someone would use FreeBSD, or there are some other reasons as well? I see you have experience with all kind of OSes. I think the combination of hardware used is at least as important as the OS. http://www.febo.com/pages/soekris/ 100ns accuracy http://www.synclab.org/radclock/ An alternative to ntpd David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server with Garmin GPS 18 LVC
unruh wrote: On 2013-12-19, David Lord sn...@lordynet.org wrote: Adrian P wrote: . Everywhere is written that FreeBSD is the best OS for time keeper, since its kernel supports nanosecond accuracies. However, if GPS 18x LVC PPS signal has only microsecond accuracy, then I suppose there is no point on using FreeBSD, any linux would be okay as well. So what do you think, looking from NTP point of view only, is this nanosecond accuracy the only reason why someone would use FreeBSD, or there are some other reasons as well? I see you have experience with all kind of OSes. I think the combination of hardware used is at least as important as the OS. http://www.febo.com/pages/soekris/ 100ns accuracy AGreed. But their comparison is strongly cooked. At least on my system, the serial port interrupt performace is far better than theirs-- something like 2 us, not the 50us they are showing. Certainly 100ns is better, but more like one order of magnitude, not more than 2. It might not be very clear but PPS to serial port isn't used other than as a comparison, ntpd has been modified to use the Elan Timer with PPS input to the GPIO. I have a couple of motherboards with chipsets that have higher resolution timestamping but the GPIO pins aren't accessible. David http://www.synclab.org/radclock/ An alternative to ntpd David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server with Garmin GPS 18 LVC
unruh wrote: On 2013-12-19, David Lord sn...@lordynet.org wrote: unruh wrote: On 2013-12-19, David Lord sn...@lordynet.org wrote: Adrian P wrote: . Everywhere is written that FreeBSD is the best OS for time keeper, since its kernel supports nanosecond accuracies. However, if GPS 18x LVC PPS signal has only microsecond accuracy, then I suppose there is no point on using FreeBSD, any linux would be okay as well. So what do you think, looking from NTP point of view only, is this nanosecond accuracy the only reason why someone would use FreeBSD, or there are some other reasons as well? I see you have experience with all kind of OSes. I think the combination of hardware used is at least as important as the OS. http://www.febo.com/pages/soekris/ 100ns accuracy AGreed. But their comparison is strongly cooked. At least on my system, the serial port interrupt performace is far better than theirs-- something like 2 us, not the 50us they are showing. Certainly 100ns is better, but more like one order of magnitude, not more than 2. It might not be very clear but PPS to serial port isn't used other than as a comparison, ntpd has been modified to use the Elan Timer with PPS input to the GPIO. I understand that they do not use pps to serial port, but they compare to ntpd with serial input to show how much better they are. What I object to is that that comparison is cooked. ntpd with pps to serial is a lot better than their graph indicates. They are doing something very wrongly to get such bad results. And it is unnecessary because they are better than ntpd with pps to serial. My loop_summary from Sure GPS + NetBSD-6 + ntp-dev-4.2.7p401 over a 7 day period has offset(us) 7 +/-34 to 21 +/- 52 and rms offset from 3.9 to 6.1. If ntpd is throwing away 7 out of 8 polls I'd say their results could be similar to mine. Also since from that page ntp gettime Thu, Oct 19 2006 20:10 there have been many changes to ntpd. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
DaveB wrote: In article slrnlaujq8.ded.koste...@stasis.kostecke.net, koste...@ntp.org says... On 2013-12-16, DaveB spam.g...@nowhere.com wrote: I'm currently stuck, trying to get the system sources, so I can enable PPS support in the kernel. The old sysinstall seems broken, in as much as it cant seem to download anything from anywhere. http://forums.freebsd.org/viewtopic.php?t=29172 discusses installing FreeBSD 9 source. Hi again Steve. I'm obviously a total numpty, as either of the methods in that posting fail. (And yes, I did change 9.0 to 9.2) I'm guessing FBSD doenst associate ftp: with the ftp protocol when fed it on the command line, unlike some other os's. (Comes up with command not found.) Tried ftp, and got the ftp prompt (ftp) but even then asking in several ways, all I get is Not connected. If I try to connect first (logical) as I don't know the account details, again, I'm stuffed. SVN. Again, sad to say this is another case where I cant get that to fly either. I've tried that (and similar for other needs on other OS's in the past) and never got it to work on any platform. My total lack of understanding of what it is and how to use it. Sorry, but I realy need a fully worked and tested blow by blow example to do this sort of simple stuff. Oddly, I can manage kernel compiles and booting to that just fine, I've done that in the past several times, but I always had the sources from the outset. have you setup networking? network interface in /etc/rc.conf defaultroute in /etc/rc.conf resolv.conf I've just checked on my not configured freebsd-5.2.1 which needed ifconfig rl0 192.168.59.156 netmask 255.255.255.0 route add default 192.168.59.64 echo nameserver 192.168.59.64 /etc/resolv.conf then ftp -4 ftp://ftp.freebsd.org/ connected to ftp.beastie.tdk.net. In above rl0 = my particular interface 192.168.59.156 = local host ip 192.168.59.64 = local nameserver and also gateway man is useful so try man ftp to get required syntax whereis ftp should give location of ftp command unless your install is badly broken. best of luck David Also, I don't get much contiguious time, so it's poke and hope, fail, go do something else (such as fixing the leaking toilet that's next on the list) Best Regards. Confused again. Dave B. PS: If the smart money keeps saying don't use Sysinstall, it's broken and depreciated. Why the *%$! is it still present in the system? ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
DaveB wrote: In article 9q06oa-gbr@ns2.lordynet.org.uk, sn...@lordynet.org says... DaveB wrote: Snipped Sorry, but I realy need a fully worked and tested blow by blow example to do this sort of simple stuff. Oddly, I can manage kernel compiles and booting to that just fine, I've done that in the past several times, but I always had the sources from the outset. have you setup networking? network interface in /etc/rc.conf defaultroute in /etc/rc.conf resolv.conf I've just checked on my not configured freebsd-5.2.1 which needed ifconfig rl0 192.168.59.156 netmask 255.255.255.0 route add default 192.168.59.64 echo nameserver 192.168.59.64 /etc/resolv.conf then ftp -4 ftp://ftp.freebsd.org/ Yes, networking fully setup and functional: - # /root ifconfig xl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=82009RXCSUM,VLAN_MTU,WOL_MAGIC,LINKSTATE ether 00:b0:d0:64:9e:47 inet 192.168.42.21 netmask 0xff00 broadcast 192.168.42.255 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active plip0: flags=8810POINTOPOINT,SIMPLEX,MULTICAST metric 0 mtu 1500 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff00 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL # /root - I'm using a ssh shell sesssion from a Windows7 PC, so I can have Gravity, Firefox and the BSD console open on the same screen, even copy/paste between them. The ntpd daemon is running, currenty syncing with 'net based servers, and in turn serving up time locally. All that appears to be working OK. (not sure about warwicknet and the reach value of 333!) Sometimes I lose reach on two of my own servers and I'm fairly sure it's because they'd both be synced to the same refid. - # /root ntpq -p remote refid st t when poll reach delay offset jitter == -time.mhd.uk.as4 217.114.59.663 u 778 1024 377 28.6761.408 0.767 +ntp2.warwicknet 195.66.241.2 2 u 169 1024 333 30.9320.157 203.431 +ns1.luns.net.uk 158.43.192.662 u 175 1024 377 39.7331.644 1.762 *electra.pinklem 129.69.1.153 2 u 974 1024 377 27.712 -0.502 0.422 # /root - (that got wrapped) Just that I (mistakenly) omited to install the system sources when doing the base install.Else, I'd probably be all done and dusted as far as PPS based time sync goes. It seems however, there may be an alternative way to enable PPS support, from another message in this thread. Then, I can get the GPS hardware connected, just using the 'net as fallback if the GPS system burps. Heck, this time I might even add the server to the uk pool, if that doenst tip my hand with my ISP. I joined the pool Nov 2009 and had a fright first week when my monthly usage allowance was blasted by turk telecom. Fortunately the pool dns rotation meant I wasn't hit again for a few weeks. cheers David Best Regards. Dave B. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP server with Garmin GPS 18 LVC
Adrian P wrote: Hi, In an old IBM thinkpad T22 laptop that runs FreeBSD 9.2, I have configured a NTP server that gets the PPS signal from a Garmin GPS 18 LVC, as described here: http://www.satsignal.eu/ntp/FreeBSD-GPS-PPS.htm The /etc/ntp.conf contains the following generic NMEA GPS receiver driver configuration: server 127.127.20.0 mode 1 minpoll 4 maxpoll 4 prefer fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 refid PPS I let it run for a few days, however I still have every now and then huge peaks (between -50 and +30 us) of the clock offset as seen in the following graph: http://goo.gl/JpSyeO So I am wondering: why those repeating huge clock offsets? They allays starts with a negative peak, followed immediately by a positive one. Is this because of the faulty laptop internal clock, that drifts away with 30-40 us every now and then? Any thoughts? On my system I usually have at least one or two spikes each evening which correspond to nightly cron jobs. I'm guessing localised motherboard temperature increases faster than ntpd+pps can correct. The following peak is usually of opposite sign. $ tail -n 6 /var/log/ntp/stats/loop_summary loopstats.20131214 loop 5400, 14+/-45.3, rms 5.8, freq -36.39+/-0.331, var 0.093 loopstats.20131215 loop 5400, 8+/-36.3, rms 4.0, freq -36.44+/-0.270, var 0.080 David Many thanks, Adrian ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
DaveB wrote: In article k7kdnw2t7onhkddpnz2dnuvz_rodn...@supernews.com, lau...@acm.org says... If you built it from a port, it gets installed in /usr/local/bin. The default system built ntp programs go in /usr/bin or /usr/sbin. Tom Thanks Tom (and the rest of the collective).. That's exactly were it was hiding (in plain sight!) I've added override variables in /etc/rc.conf to point to both ntpd and ntpdate that are located in /usr/local/bin. I also see there is a companion ntpq in there too, but in /etc/default/rc.conf There is no default path set to that program. For now, I've a commented out line in /etc/rc.conf # ntpq_program=/usr/local/bin/ntpq Commented out as I don't know if that will work. (I'm still re- educating myself with the neuances of BSD, it's been a while.) Ntpdate was only run the one time to yank the box to current date-time, but ntpq is of course run as needed to see what's happening, often over a sshd session, if I get an email from someone wondering why something appears to have gone awry, on a yet to be reinstated webpage. For now, having stopped ntpd, applied the changes I need in /etc/rc.conf then restarted ntpd, sure enough, the Meinberg monitor program on the Windows PC accross the room now reports the BSD box is running ntpd 4.2.6p5@1.2.3.4.9 built on December the 14th at 10:15 UTC, that is indeed the day and time I built it. So... So far, so good. Comments would be appreciated re setting the path to ntpq, but for now, all's working, while I figure out what next to do... Again this is from NetBSD-6 rather than FreeBSD-5.2.1. I have /etc/profile used to set profile for newly created users and have changed PATH so /usr/local/(s)bin is found before /usr/pkg/(s)bin before /(s)bin. I also updated .profile and .bash_profile for existing users. Note this is a security risk if users can drop programs in /usr/local/(s)bin David Best Regards. Dave B. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
DaveB wrote: In article slrnlau41o.i6t.koste...@stasis.kostecke.net, koste...@ntp.org says... On 2013-12-16, DaveB spam.g...@nowhere.com wrote: Snipped For now, I've a commented out line in /etc/rc.conf # ntpq_program=/usr/local/bin/ntpq Commented out as I don't know if that will work. (I'm still re- educating myself with the neuances of BSD, it's been a while.) Your shell searches for executables in the directories specified by your PATH. /usr/local/bin needs to appear in your PATH before /usr/bin if you want the ports versions of commands to override the system commands. Or set up a shell alias. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/shells.html Hi Steve. Thanks for that link, generaly the handbook just leaves me cold. It's a good reference, if you sort of already know what to do in the first place, but it's rubbish to learn from sadly... That page is better than most however, thanks again. I'm currently stuck, trying to get the system sources, so I can enable PPS support in the kernel. The old sysinstall seems broken, in as much as it cant seem to download anything from anywhere. Where as, the newer bsdinstall program, want's to reformat the hard drive and start over each time! So... How do I get the system sources downloaded in a usable form, so I can enable pps support in the kernel and use that. Or, do I have to trash the system and start over(again?) It seems (also, again) that all the documentation is some way behind even the stable release versions. I can understand that with third party sites, but not the main FreeBSD handbook or other pages. I'm just about to install freebsd again, my 5.2.1 wasn't really used, and I just downloaded isos for both i386 and x64 9.2 ftp://ftp2.uk.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/9.2/; Rather than trash the system you could try the freebsd-update utility. This probably won't solve your ntp pps problem but it may give you a clean start for build and install of a new kernel and base system from source. With NetBSD it just needs addition of PPS_SYNC and HZ options to the kernel config, build, copy new kernel and reboot. David Sorry for the bother... Regards All. Dave B. PS. The best overall general installation and post install config guide I've found so far for FreeBSD9.x is at:- http://www.a1poweruser.com/ Web based text format, and downloadable pdf too. As well as the usual places specific to setting up GPS disiplined NTP servers. But, see above re getting the system sources, or not ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
Hal Murray wrote: In article mpg.2d16dc26c99a8af7989...@aioe.org, DaveB spam.g...@nowhere.com writes: But, I don't know, nor can find out where the newly built newer version ntpd was placed, so I can change that variable above. So... Where is it likely to have been put? Or how do I find out? You could run make install again, and watch the printout to see where it put stuff. You could try something like locate ntpd | grep usr (That's guessing that it's someplace in usr.) The locate database only gets updated weekly, but man locate will tell you how to update it right-now. You could try find /usr -name ntpd I don't have FreeBSD running just now but on NetBSD: $ whereis ntpd /usr/sbin/ntpd /usr/local/bin/ntpd David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Silly question.
DaveB wrote: Hi All. Here's something to make you all laugh In the process of configuring a new instance of NTP on FreeBSD_9.2 Mostly, all's gone well. But, Even though I successfully downloaded built and installed 4.2.6p5_2 (that took a very long time.) The instance of the Meinberg ntp monitor program I use from another PC, shows that the BSD box is using 4.2.4p5-a OK, I've found the system variable in /etc/defaults/rc.conf, NTPD_PROGRAM=/usr/sbin/ntpd But, I don't know, nor can find out where the newly built newer version ntpd was placed, so I can change that variable above. So... Where is it likely to have been put? Or how do I find out? Regards. Dave B, confused again. Hi Don't you have /etc/rc.conf NetBSD might not be relevant but when I started builds/installs of ntpd-dev-4.2.7 I found that ntpd seemed to lock /usr/sbin/ntpd in place and my attempts at copying from /usr/local/bin were failing. Workaround was first to stop ntpd, copy new version, restart ntpd. That was while testing to see if the change was worthwhile. I've now changed my default PATH so that /usr/local/bin/ntpd is picked up first. My /etc/rc.d/ntpd has a hardcoded command path and I also updated that. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] logs not populating
Antonio Marcheselli wrote: What were you expecting it to log? (What has changed since the message at 2013-12-04T02:59:22?) Usually logs I've seen keep reporting that the NTP has synchronised once or twice a day? Only if one source becomes better than another. Ideally it will not produce those outputs because the quality of the sources remains stable. Interesting. I've always seen entries on that log file, that's why I was wondering. What could I put in the configuration file to monitor the ntp behaviour - without a massively long log file? Thanks From ntp1.lordynet.org $ cat /var/log/ntp/ntp.log Nov 30 03:00:00 ns1.lordynet.org newsyslog[6691]: log file turned over I run cron jobs at intervals: 13,33,53 * * * * /bin/sh /root/scripts/ntp/ntp-stat.sh 16 6 2 * */bin/sh /root/scripts/ntp-monthly.sh 6 1 * * * /bin/sh root/scripts/ntp/ntp-stats/summary.sh 7 0 * * * /bin/sh /root/scripts/ntp/pool/pool-log.sh /etc/ntp.conf has: logconfig+allsync +allclock statsdir /var/log/ntp/stats statistics loopstats peerstats sysstats filegen loopstats file loopstats type day link enable filegen peerstats file peerstats type day link enable filegen syncstats file syncstats type day link enable That generates a lot of data that is summarised and archived each month in some cases with original data being deleted. Most of my scripts use utilities from the ntpd distribution. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Bug 2341 - ntpd fails to keep up with clock drift at poll7
unruh wrote: On 2013-12-03, David Lord sn...@lordynet.org wrote: unruh wrote: On 2013-12-02, David Lord sn...@lordynet.org wrote: Martin Burnicki wrote: My server with Sure gps/pps has offset below 3 us other than when nightly cron jobs give a couple of 35 us spikes. From loop_summary over 7 days, typical range for rms offset is 3.9-6.1. Over 7 days my four pool servers have following rms offset ranges ntp0=784-1646, ntp1=405-837, ntp2=310-434, ntp3=586-1270 but there were numerous reboots and ntpd restarts over that period. I want to try using a stable external system clock source, TCXO, OCXO or rubidium laser. A sure gps IS a stable external system clock source. What more do you want? ? it is a PPS source not a system clock source. I'd prefer the 35 us blips to go away which would require the PC to be idle 24/7 or a use of a stable external system clock. ??? That 35us blip is quite possibly there either because of delays in reading the clock, which would also be delayed with an external clock. Ie, I would need to see some evidence that an external clock would be any more accurate in getting the time into the system, than would the gps. And those offsets for your pool servers really seem very high. did you miss that: were numerous reboots and ntpd restarts over that period. No I meant that delays I have seen getting time from stratum 1 servers were in the tens of microsecond not hundreds or thousands of microsecond regime. Now it may be that the pool servers you are using are really just horrible as clocks (milliseconds I call just horrible). But I certainly would not expect network delays to give that kind of errors. Also, I would assume that you are not taking the behaviour during startup transients into account. but peak offsets are still 300-500 us and I'd prefer if they were even lower, again requiring a more stable system clock. Why would they be lower. Those are probably the fluctuations in teh remote clocks, and have nothing to do with the fluctuations in your local clock. What do you think the local offsets should be for a pool server? It depends on the pool server. Some simply use nmea and claim to be stratum 1. As I say, the offsets from a reliable pps driven stratum 1 from across the country are in the 10s of microsecond range for me. (even though delays were in the 10s of ms range) Whilst on adsl delays for me have increased from about minimum of 5ms to current minimum of 22ms. Distance from telephone exchange has increased from about 400m to about 1400m Ntp2.lordynet.org.uk has a local stratum 1 source almost 1ms distant and 5 x stratum 2 sources with delays from 22ms to 45ms. Other three servers have internet sources mostly at stratum 2 but some at stratum 3. That means my four pool servers are at stratum 2, 3 or 4. Local offsets of the servers are mostly 500us. I can't imagine ntpd or even chrony achieving 10s of microseconds offset from a remote stratum 1. I might just try chrony on a spare pc, I used chrony when I had a dialup connection to Demon along with ntpd for the lan. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Bug 2341 - ntpd fails to keep up with clock drift at poll7
Martin Burnicki wrote: Ed, Mischanko, Edward T wrote: Martin, Reading your reply, it sounds like you understand and somewhat confirm this bug. I *think* I have observed something like this some time ago. I agree this may be a Windows XP only bug. I'm not sure whether it is. We'll have to find this out, but this can be very time-consuming. We need to test both ntpd-stable (4.2.6p5) and ntpd-dev (4.2.7p???) both under Windows XP and Windows 7. Under Win XP both ntpd-stable and ntpd-dev should converge fine at low polling intervals. We need to know if one of them or both are still stable when the polling interval increases beyond 7. Under Win 7 ntpd-dev should also converge fine at low polling intervals, so another test could find out if it also stops to converge when the polling interval ramps up beyond 7. ntp-staple might converge under Win 7, or not. If it doesn't at low polling intervals then it makes no sense to see what happens if the polling interval ramps up, if that happens at all. Since this seems to happen under Windows only, the reason could be some calculation error or overflow, and it can have been unintentionally fixed or introduced between ntp-stable and ntp-dev. So IMO we first need to find under which conditions this occurs, then we can try to find a bug in the source code. I have not the ability to confirm this bug on newer versions of Windows or newer versions of NTP at work. The bug was seen on a stable corporate LAN, of which I am now locked out of by the IT Security Gestapo. Huh, what have you done? ;-) I am no longer able to use your stable, or test your developmental software at my workplace. I also am no longer able to provide constructive feedback on this software in this environment. At home, I found all the FreeBSD and Windows, XP and 7, ports to be unstable in the WAN / Internet environment. Hm, if even the FreeBSD version is unstable I'd say this is due to you network environment or configuration. As said above, a reliable test should first make sure that proper synchronization is possible, i.e. with a stable network connection and a good upstream NTP server. NTP polling increases regardless of offset and NTP appears not to keep up or sync the clock. I have not observed any over-regulation that is feared with a shorter polling interval. My primary goal is to have the smallest offset as possible; after that goal is met, I can worry about clock jitter. Is that the goal of NTP? If so, it is not working in the 100% network environment, with no PPS reference server use, and default software settings. I would be happy to answer specific questions if my observations are still not fully understood. I've just set up some tests with XP/ntp-stable and Win7/ntp-dev to see how it gores and if I can confirm this bug. Martin I had maxpoll set at 10 when I first setup my network but sometimes at that poll rate combined with daily temperature variations offsets would gradually increase both in +ve and -ve directions. This could clearly be seen in mrtg graphs. Solution was to reduce maxpoll to 7 or 8. I never thought of this as a bug. There was a daily variation depending on season and a variation due to system load. This has been with NetBSD 1997 to date and a period of a few years when running FreeBSD. Currently NetBSD-6, ntp-dev-4.2.7p401, four of the servers are in the pool. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Bug 2341 - ntpd fails to keep up with clock drift at poll7
Martin Burnicki wrote: David Lord wrote: I had maxpoll set at 10 when I first setup my network but sometimes at that poll rate combined with daily temperature variations offsets would gradually increase both in +ve and -ve directions. This could clearly be seen in mrtg graphs. Solution was to reduce maxpoll to 7 or 8. I never thought of this as a bug. There was a daily variation depending on season and a variation due to system load. This has been with NetBSD 1997 to date and a period of a few years when running FreeBSD. Currently NetBSD-6, ntp-dev-4.2.7p401, four of the servers are in the pool. I think we need to distinguish if there's a computational problem in the code due to a rounding error, range overflow, or similar, or a systematic problem, where ntpd is in general unable to apply adjustments fast enough to compensate frequency drifts varying fast with temperature changes. Which the former can be fixed in the code once the wrong code has been detected, the latter can only be changed by redesigning ntpd's behavior. As far as I know long polling intervals are used preferably to increase the accuracy of the drift measurement. For example, if you want to see if your wrist watch goes fast or slow, you can't see this properly if you check it once per minute. However, if you check it after one day you see how many seconds the wrist watch has gained or lost. However, as I understand this, this only yields proper results if the frequency doesn't vary too much over the measurement interval. So if ntpd only compares the time once every 1024 s the frequency may have increased and decreased again during this interval, e.g. due to varying CPU load, without this being noticed by ntpd. So the correction computed in such case is probably not optimal. From my understanding it would be better if ntpd polled in shorter intervals to detect if the frequency drift is constant, or not. If it is not it could decrease the polling interval to react faster on frequency changes. However, changing the latter would need some reengineering of the control loop. My server with Sure gps/pps has offset below 3 us other than when nightly cron jobs give a couple of 35 us spikes. From loop_summary over 7 days, typical range for rms offset is 3.9-6.1. Over 7 days my four pool servers have following rms offset ranges ntp0=784-1646, ntp1=405-837, ntp2=310-434, ntp3=586-1270 but there were numerous reboots and ntpd restarts over that period. I want to try using a stable external system clock source, TCXO, OCXO or rubidium laser. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Bug 2341 - ntpd fails to keep up with clock drift at poll7
unruh wrote: On 2013-12-02, David Lord sn...@lordynet.org wrote: Martin Burnicki wrote: My server with Sure gps/pps has offset below 3 us other than when nightly cron jobs give a couple of 35 us spikes. From loop_summary over 7 days, typical range for rms offset is 3.9-6.1. Over 7 days my four pool servers have following rms offset ranges ntp0=784-1646, ntp1=405-837, ntp2=310-434, ntp3=586-1270 but there were numerous reboots and ntpd restarts over that period. I want to try using a stable external system clock source, TCXO, OCXO or rubidium laser. A sure gps IS a stable external system clock source. What more do you want? ? it is a PPS source not a system clock source. I'd prefer the 35 us blips to go away which would require the PC to be idle 24/7 or a use of a stable external system clock. And those offsets for your pool servers really seem very high. did you miss that: were numerous reboots and ntpd restarts over that period. but peak offsets are still 300-500 us and I'd prefer if they were even lower, again requiring a more stable system clock. What do you think the local offsets should be for a pool server? David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Strange refid
A C wrote: On 11/11/2013 13:38, E-Mail Sent to this address will be added to the BlackLists wrote: On 11/10/2013 10:35 PM, A C wrote: Anyone care to explain what this refid means? This is from the billboard on one of my machines. This came from the round-robin DNS pool but I couldn't tell you which round-robin provided it other than one of the North America or US pools. 204.109.63.243 .M-F.\.. 16 u 86 512 376 58.947 -201.11 138.426 Medium Frequency Radio? (LORAN-A?) Given that it was late Sunday I almost thought This server open Monday through Friday only. :) I don't think it would be LORAN since there are no more LORAN transmitters in the US. LORAN-A has been long gone and LORAN-C shut down a couple years ago. The server in question is normally a stratum 2 system and currently has a stratum 1 server IP as the refid. Are either WWV(various hf) or WWVB(60kHz) still online? Here I sometimes receive MSF (60kHz) but the transmitter was relocated from Rugby to Anthorn Cumbria and reception is no longer good. remote refid st t when poll reach delay offset jitter SHM(0) .MSFa. 4 l 35m64 0 0.000 5.330 0.000 *me6000e .PPSb. 1 u2664 377 0.587 -0.436 0.239 David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP not syncing
Antonio Marcheselli wrote: Same server, same network, what happened?? Ntpd is intended to run continuously, here I've seen uptimes of +200 days. Older releases of ntpd don't behave at all well if repeatedly restarted so above method is same as I use when restarting after an outage, especially if the battery backed RTC is not keeping good time during the outage. The clock is synced to an NTP server at boot using NTPDATE, before ntpd starts. Today drift is 60 and offsets are around 8. Looks good. You know what's good? from: ntp3.lordynet.org NetBSD-6.1, i386, ntpd 4.2.6p5: $ cat /var/db/ntp/ntpd.drift -9.722 from ntpq -crv offset=-0.061 Your ntpd 4.2.4 is from 2008 through 2009 and offsets with that version might not have been much worse than from 4.2.6p5 but correction of drift above 50 ppm was not good or even impossible. Ntpd 4.2.6p5 also converges to a reasonable low offset much faster after ntpd is restarted. I have an idea that ntpd 4.2.8 is very near to release. Your problem may not be with the setup of ntpd and you really need to know what cpu optimisations, if any, are enabled. Some optimisations for energy consumption are incompatible with running an ntpd service. I can't help you with bios settings or diagnostics for your motherboard settings. You might find some information in dmesg but again that requires familiarity with your hardware. David Thanks Antonio ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP not syncing
unruh wrote: On 2013-11-02, antonio.marchese...@gmail.com antonio.marchese...@gmail.com wrote: Hello all, I have a Linux machine which comes with fixed configuration. The manufacturer allows only ONE NTP server to be setup and I learnt that this is not ideal. In fact, the NTP service usually does not work and I have to reboot the machine every now and then, so the NTPDATE command built in the boot script can re-sync the clock. Stupid setup unless that is a pool server and even then a few more than one would be useful. I have tinkered with the configuration file manually and ended up with a working server. But when I stored the same configuration on the read only partition and rebooted, looks like it does not work anymore and after 2 days the offset keeps increasing. How did you store on a read only partition. read only means that partition cannot be written to and thus cannot store anything. I put the same configuration on three different servers on the same network, looks like sometimes it works, sometime it doesn't. Here is my configuration from ntp.con === server 127.127.1.0 Completely lunatic. You do NOT use the local refclock ever. (And if you know that that statement may have some exceptions, you may know enough to use it, but even then probably not). fudge 127.127.1.0 stratum 10 server 158.43.128.66 server 81.168.77.149 server 130.88.200.4 What servers are those? You should NOT be using fixed addresses unless you personally control them. 158.43.128.66 ntp1.pipex.netis/was internet provider 81.168.77.149 mail.my-inbox.co.uk eclipse.net.uk Eclipse Internet 130.88.200.4dir.mcc.ac.uk ntp server at Manchester uni These are or used to be listed on list of public servers at www.ntp.org David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP not syncing
antonio.marchese...@gmail.com wrote: server 127.127.1.0 fudge 127.127.1.0 stratum 10 Remove the above. Although it seems to be ignoring them at the moment, they are nearly always wrong, and are incompatible with tos orphan. Thanks. I was suggested those parameters on another forum. The reason was that if the NTPs are not reachable it locks on itself. tos orphan 4 Caution 4 is rather low, but that is not relevant here as you are not in orphan mode. I can change to something higher to be on the safe side. You mentioned previously that you are using a read only partition in which case I cannot see how you can run ntpd. Can you explain the partition layout? What operating system exactly? Ntpd writes to its drift file and also ntp.log. The drift file is critical and is used and updated at intervals by ntpd. eg. from one of my systems: $ cat /var/db/ntp/ntp.drift -49.237 David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP not syncing
antonio.marchese...@gmail.com wrote: You mentioned previously that you are using a read only partition in which case I cannot see how you can run ntpd. Can you explain the partition layout? What operating system exactly? Good questions, as you may have realised I'm not a Linux person. The server has a read only partition for configurations. When the server is booted up it creates some configuration files - including the ntp.conf - from some scripts which are saved on the RO partition. This scripts get the IP address of the NTP server from a configuration file created when the server is installed and creates a ntp.conf file. I remounted the RO partition as RW, amended the script so that the ntp.conf is as you saw, saved it and remounted the partition as RO. This is because I could amend the ntp.conf manually - it is on a RW partition - but it would be overwritten when the server is rebooted. My guess is you're not meant to do it that way but then I'm no expert at configuring debian. Are you completely unable to resolve ip address to hostname eg. $ host 130.88.200.4 4.200.88.130.in-addr.arpa domain name pointer dir.mcc.ac.uk. Somewhere in your config you should have set nameservers or resolv.conf. eg. $ cat /etc/resolv.conf nameserver 192.168.59.64 You usually get addresses for your nameserver(s) from your internet provider or it manager if your with a large organisation. You can then replace the fixed server ip addresses in ntp.conf with server 0.uk.pool.ntp.org .. 3.uk.pool.ntp.org. You also probably need to stop ntpd if it's not synced with a low offset of a few ms, delete the driftfile, run ntpdate then restart ntpd. drift file is on a RW partition. I do not know the partitions layout to be honest, the SO is Debian 5.0.7. Thanks, Antonio ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP not syncing
Antonio Marcheselli wrote: My guess is you're not meant to do it that way but then I'm no expert at configuring debian. As pointed out by John, it's how the manufacturer implemented the system. Are you completely unable to resolve ip address to hostname eg. $ host 130.88.200.4 4.200.88.130.in-addr.arpa domain name pointer dir.mcc.ac.uk. Yes, I get a timeout. Sorry but I can't really amend network settings. The network on this machine is being used for critical secure packages and anything wrong would have bitter consequences. I appreciate that using pools would be better but in my case I'm happy with just the IP numbers. If/when the servers go offline I'll change the configuration. But thanks for your input anyway You also probably need to stop ntpd if it's not synced with a low offset of a few ms, delete the driftfile, run ntpdate then restart ntpd. Which I did an hour-ish ago. Stopped ntpd, deleted drift file, amended configuration as you suggested as below: server 158.43.128.66 iburst server 81.168.77.149 iburst server 130.88.200.4 iburst restrict 127.0.0.1 restrict 169.254.1.1 mask 255.255.0.0 nomodify tos orphan 6 driftfile /status/etc/ntp/ntp.drift logfile /var/log/ntp.log multicastclient broadcastdelay 0.008 enable monitor Now after just an hour the drift is -30, and all offsets are near zero. Same server, same network, what happened?? Ntpd is intended to run continuously, here I've seen uptimes of +200 days. Older releases of ntpd don't behave at all well if repeatedly restarted so above method is same as I use when restarting after an outage, especially if the battery backed RTC is not keeping good time during the outage. David Antonio ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP clients
David Lord wrote: Steve Kostecke wrote: On 2013-10-29, David Lord sn...@lordynet.org wrote: My systems are running netbsd-6 i386. Stock ntpd is ntp-4.2.6p5, pkgsrc version of ntpd is 4.2.4. My pc with gps/pps has ntp-4.2.7p377 and from that I get ***Command 'mrulist' unknown mrulist was added in 4.2.7p22; see http://archive.ntp.org/ntp4/ChangeLog-dev or search the ntp-dev source code repository at bk.ntp.org ntpq prior to 4.2.7p22 does not support mrulist ... so 4.2.7p377 I've used since August is broken? or do I need to add some options to enable that command? | associd=0 status=011d leap_none, sync_pps, 1 event, kern, | version=ntpd 4.2.7p377@1.2483-o Tue Jul 30 18:01:47 UTC 2013 (1), | processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, | precision=-18, rootdelay=0.000, rootdisp=400.195, refid=PPSb, | reftime=d61ade0d.50cec958 Wed, Oct 30 2013 1:23:25.315, | clock=d61ade1a.c7c4f3bc Wed, Oct 30 2013 1:23:38.780, peer=41951, tc=4, | mintc=3, offset=-0.002, frequency=-36.004, sys_jitter=0.003815, | clk_jitter=0.002, clk_wander=0.002, tai=35, leapsec=20120701, | expire=20131201 built from source downloaded from www.ntp.org I've now downloaded ntp-dev-4.2.7p393 but in middle of upgrades so might be a week or more before it's built/installed. David Here's ntpq from the current stable release: me@home:/tmp$ ./ntpq -n -cmrulist ***Command `mrulist' unknown me@home:/tmp$ ./ntpq -v ./ntpq: illegal option -- v ntpq - standard NTP query program - Ver. 4.2.6p5 USAGE: ntpq [ -flag [val] | --name[{=| }val] ]... [ host ...] Here's ntpq from the current ntp-dev snapshot: me@home:/tmp$ which ntpq /usr/bin/ntpq me@home:/tmp$ ntpq -n -cmrulist Ctrl-C will stop MRU retrieval and display partial results. Retrieved 9 unique MRU entries and 0 updates. lstint avgint rstr r m v count rport remote address == 142 10430 . 4 4 1095 123 69.64.58.101 158 10070 . 4 4 1134 123 38.229.71.1 745 10330 . 4 4 1105 123 199.102.46.73 840 10390 . 4 4 1098 123 66.225.61.66 873 10400 . 4 4 1097 123 192.155.88.169 887 10030 . 4 4 1138 123 166.70.136.35 947 10050 . 4 4 1136 123 108.61.73.243 964 10180 . 4 4 1121 123 67.212.118.60 1023 10260 . 4 4 1112 123 74.120.8.2 You have new mail in /var/mail/me me@home:/tmp$ ntpq -v /usr/bin/ntpq: illegal option -- v ntpq - standard NTP query program - Ver. 4.2.7p393 Usage: ntpq [ -flag [val] | --name[{=| }val] ]... [ host ...] Try 'ntpq --help' for more information. exit 1 me@home:/tmp$ I've now built ntp-4.2.7p393 and had same problem with ntpq -c mrulist. My system has ntp-4.2.6p5 installed in base and ntpq is that from 4.2.6p5. When I use command /usr/local/bin/ntpq -c mrulist I get the expected result: bash-4.2$ /usr/local/bin/ntpq -c mrulist Ctrl-C will stop MRU retrieval and display partial results. Retrieved 9 unique MRU entries and 0 updates. lstint avgint rstr r m v count rport remote address == 0 480 . 4 4 24 123 ns1.lordynet.org 7 480 . 4 4 24 123 ns2.lordynet.org.uk 14 500 . 4 4 23 123 ns0.lordynet.org.uk 35 620 . 3 4 18 123 me6000g.home.lordynet.org 56 620 . 3 4 17 123 d525mw03.home.lordynet.org 64 470 . 4 4 23 123 ns3.lordynet.org 715260 . 3 4 2 123 p4x2666.home.lordynet.org 83107 190 . 4 4 10 123 ntp1.aa.net.uk 339 00 . 3 3 1 1095 p2x733.home.lordynet.org bash-4.2$ /usr/local/bin/ntpq -crv -p associd=0 status=011d leap_none, sync_pps, 1 event, kern, version=ntpd 4.2.7p393@1.2483-o Wed Oct 30 09:50:29 UTC 2013 (1), processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, precision=-17, rootdelay=0.000, rootdisp=400.165, refid=PPSb, reftime=d61b609b.2201a6a7 Wed, Oct 30 2013 10:40:27.132, clock=d61b60a7.0e39b8dd Wed, Oct 30 2013 10:40:39.055, peer=55992, tc=4, mintc=3, offset=-0.002671, frequency=-35.828, sys_jitter=0.007629, clk_jitter=0.001, clk_wander=0.007, tai=35, leapsec=20120701, expire=20131201 remote refid st t when poll reach delay offset jitter = -GPS_NMEA(2) .GPSb. 7 l 40 64 377 0.000 -25.685 12.241 oPPS(2) .PPSb. 0 l 12 16 377 0.000 -0.003 0.008 +ns0.lordynet.or 195.173.57.232 3 u 55 64 377 1.783 -0.705 0.649 ns2.lordynet.or 192.168.59.61 2 u 48 64 377 0.869 0.601 0.412 +ns1.lordynet.or 129.215.42.240 3 u 41 64 377 0.609 1.420 0.689 +ns3.lordynet.or 90.155.53.933 u 39 64 377 0.738 1.574 0.675 *ntp1.aa.net.uk 195.66.241.32 u 124 256 37 22.322 3.974 2.723 David
Re: [ntp:questions] NTP clients
Javed Omar wrote: Dear Sir, We are running a ntp server in our Data Center. I would like to know how to find how many clients are taking or adjusting their time from this server. Is there any command? Regards, Javed. Dhaka. BD. ntpdc -c monlist works on some of my ntp-4.2.6p5 systems but gives an error on others. When I joined the pool around 2009, I had two alternatives, a tcpdump script or logging by my firewall. The tcpdump scripts processed the information into tables whereas the firewall logging just gave number of connections along with source and destination ips. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP clients
David Taylor wrote: On 29/10/2013 08:50, David Lord wrote: [] ntpdc -c monlist works on some of my ntp-4.2.6p5 systems but gives an error on others. When I joined the pool around 2009, I had two alternatives, a tcpdump script or logging by my firewall. The tcpdump scripts processed the information into tables whereas the firewall logging just gave number of connections along with source and destination ips. David David, ntpq -n -cmrulist works on my Windows, Linux and FreeBSD 4.2.7p393 systems. My systems are running netbsd-6 i386. Stock ntpd is ntp-4.2.6p5, pkgsrc version of ntpd is 4.2.4. My pc with gps/pps has ntp-4.2.7p377 and from that I get ***Command 'mrulist' unknown David Thanks to Anitech systems for pointing that one out. More information on that command is here: https://lists.ntp.org/pipermail/questions/2010-April/026306.html Thanks to Dave Hart! ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP clients
Steve Kostecke wrote: On 2013-10-29, David Lord sn...@lordynet.org wrote: My systems are running netbsd-6 i386. Stock ntpd is ntp-4.2.6p5, pkgsrc version of ntpd is 4.2.4. My pc with gps/pps has ntp-4.2.7p377 and from that I get ***Command 'mrulist' unknown mrulist was added in 4.2.7p22; see http://archive.ntp.org/ntp4/ChangeLog-dev or search the ntp-dev source code repository at bk.ntp.org ntpq prior to 4.2.7p22 does not support mrulist ... so 4.2.7p377 I've used since August is broken? or do I need to add some options to enable that command? | associd=0 status=011d leap_none, sync_pps, 1 event, kern, | version=ntpd 4.2.7p377@1.2483-o Tue Jul 30 18:01:47 UTC 2013 (1), | processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=1, | precision=-18, rootdelay=0.000, rootdisp=400.195, refid=PPSb, | reftime=d61ade0d.50cec958 Wed, Oct 30 2013 1:23:25.315, | clock=d61ade1a.c7c4f3bc Wed, Oct 30 2013 1:23:38.780, peer=41951, tc=4, | mintc=3, offset=-0.002, frequency=-36.004, sys_jitter=0.003815, | clk_jitter=0.002, clk_wander=0.002, tai=35, leapsec=20120701, | expire=20131201 built from source downloaded from www.ntp.org I've now downloaded ntp-dev-4.2.7p393 but in middle of upgrades so might be a week or more before it's built/installed. David Here's ntpq from the current stable release: me@home:/tmp$ ./ntpq -n -cmrulist ***Command `mrulist' unknown me@home:/tmp$ ./ntpq -v ./ntpq: illegal option -- v ntpq - standard NTP query program - Ver. 4.2.6p5 USAGE: ntpq [ -flag [val] | --name[{=| }val] ]... [ host ...] Here's ntpq from the current ntp-dev snapshot: me@home:/tmp$ which ntpq /usr/bin/ntpq me@home:/tmp$ ntpq -n -cmrulist Ctrl-C will stop MRU retrieval and display partial results. Retrieved 9 unique MRU entries and 0 updates. lstint avgint rstr r m v count rport remote address == 142 10430 . 4 4 1095 123 69.64.58.101 158 10070 . 4 4 1134 123 38.229.71.1 745 10330 . 4 4 1105 123 199.102.46.73 840 10390 . 4 4 1098 123 66.225.61.66 873 10400 . 4 4 1097 123 192.155.88.169 887 10030 . 4 4 1138 123 166.70.136.35 947 10050 . 4 4 1136 123 108.61.73.243 964 10180 . 4 4 1121 123 67.212.118.60 1023 10260 . 4 4 1112 123 74.120.8.2 You have new mail in /var/mail/me me@home:/tmp$ ntpq -v /usr/bin/ntpq: illegal option -- v ntpq - standard NTP query program - Ver. 4.2.7p393 Usage: ntpq [ -flag [val] | --name[{=| }val] ]... [ host ...] Try 'ntpq --help' for more information. exit 1 me@home:/tmp$ ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] ISP bloked port 123
Bert Gøtterup Petersen wrote: David, I understand that a Raspberry-Pi would do the trick, and I am sure that would work for everyone reading this. However, to our customers and installers this would be rather invasive. They are buying/installing a TV not an IT system.. Our accuracy requirement are not impressive, merely to allow the product to talk to our cloud service (UTC +-5min). Our assumption is that some ISP block the port to prevent their customers from running a public NTP server. At the moment our best bet seem to be using 'ntpdate' on a different port at regular intervals. From a SW perspective, this is not nice nor elegant, but it would do the trick... Hi when I used dialup I used sntp port=37 to get the time (to within about +/- 1 sec IIRC). My ntpd servers will still accept requests to port 37 although when I was monitoring the number of requests I was serving those for port 37 were 1% of the total. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Reasons of NTP not to use GPS source
Igor Pavlov wrote: Thanks, Brian. I'll do all these things. Now will try to fix problem with PPS: it's level 3.3V, and serial port seems to not recognising such low level. Now playing with time2 parameter and my GPS now stoped getting x. Serial ports are RS232 rather than 3.3V TTL so you might need a converter or if your system has a parallel port you could possibly use that with type 22 (Atom) driver. Note that there is usually a delay before PPS shows itself, ntp needs to be synced, ie reach column for prefer peer might need to be at 377 before PPS is seen. If as has been suggested, you've marked the GPS as noselect and set another server as prefer, the PPS should be seen and used since the fudge time2 is not needed just yet. I can't understant one thing. Should system time be fluently corrected by NTP so in some term offset of active (*) source would be close to 0? Without PPS, ntp will condition the system clock to a low value which will fluctuate. My non PPS systems usually have offset varying around zero, best are +/- 300 us and worst are +/- 1500 us. With PPS it's mostly +/- 3 us but with peaks from heating and system load of almost +/- 40 us. David 2013/9/17 Brian Inglis brian.ing...@systematicsw.ab.ca On 2013-09-16 01:00, Igor Pavlov wrote: Hi! I am using GPS-receiver based on Geos-1m chip ( http://www.geostar-navigation.**com/en/navigation_05.htmlhttp://www.geostar-navigation.com/en/navigation_05.html ) I connected it to serial port and configured NTP. It becomes unused by NTP: when do ntpq -p reuest ti puts x near GPS_NMEA(1) record. What reasons can be for this? Example of ntpq -p output remote refid st t when poll reach delay offset jitter ==**==** == xGPS_NMEA(1) .GPS.0 l 14 16 3770.000 -303.07 4.292 *stratum1.net.PPS.1 u 62 64 377 62.800 -68.052 43.693 +dl120g7.naviteh 194.190.168.12 u 58 64 377 30.151 -100.04 52.432 +89.221.207.113 192.36.133.252 u- 64 377 10.006 -105.88 64.279 See David Taylor's pages at http://www.satsignal.eu/ntp/**NTP-on-Windows-serial-port.**htmlhttp://www.satsignal.eu/ntp/NTP-on-Windows-serial-port.html and linked pages at top for a lot of details about setup, but keep everything really simple to start, then change one thing at a time after running for a while and checking the results. Check your GPS comms and config using the supplied setup software: are you seeing NMEA output at your selected 115.2kbps? which sentences $GPRMC, etc.? has your receiver completed its initial survey and is it reporting Active, and reasonable mode, position, altitude, UTC date and time in sentence $GPRMC? how many satellites is your receiver tracking to what precision in sentences $GPGGA, $GPGSA, $GPGSV? is your receiver set to 1Hz PPS rather than 5Hz updates? is PPS toggling DCD high for about 100ms at the start of ecah second? Note that Windows recognizes only low to high DCD transitions as PPS. If your mouse cursor starts jumping around, unplug your RS232 cable, *disable* the Windows mouse driver which just got loaded on your serial port, plug in your RS232 cable, and restart if required. If all that looks good, next try disabling everything but PPS and $GPRMC sentence output from your receiver config, and use only your server 127.127.20.n line, without any fudge settings, plus your backup Internet servers, in ntp.conf. Then restart NTP and see if ntp.log shows something like: ... 14 Aug 12:50:38 ntpd[]: GPS_NMEA(#) serial /dev/gps# open at 4800 bps 14 Aug 12:50:38 ntpd[]: GPS_NMEA(#) 8011 81 mobilize assoc # ... 14 Aug 12:50:39 ntpd[]: GPS_NMEA(#) 802b 8b clock_event clk_no_reply 14 Aug 12:50:39 ntpd[]: Using user-mode PPS timestamp for GPS_NMEA(#) ... 14 Aug 12:50:57 ntpd[]: GPS_NMEA(#) 8034 84 reachable 14 Aug 12:50:57 ntpd[]: GPS_NMEA(#) 904a 8a sys_peer ... Now ntpq -p should show * beside your GPS_NMEA(#) entry: remote refid st t when poll reach delay offset jitter ==**==** == *GPS_NMEA(#) .GPS.0 l 12 16 3770.000 -0.011 0.021 and if you defined statsdir ... and statistics clockstats in ntp.conf you should see entries in clockstats.mmdd like: 56512 7.123 127.127.20.# ... ...$GPRMC,06,A,5108.,**N,11411.,W,000.0,000.0,** 080813,014.7,E,D*0F If nothing seems to be working, try restarting the NTP service - at times it seems to have issues getting going properly in various ways. __**_ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/**questionshttp://lists.ntp.org/listinfo/questions ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Reasons of NTP not to use GPS source
Igor Pavlov wrote: Sorry, didn't see the first part of your answer. I thought that offset - it's offset of current system time from NMEA-based info. But if system time would be set to this NMEA-based time, than offset would not be so great. Isn't it? But NTP prefer to sync to other sources - Why? 1. PPS is usually very accurate, better than 1 us and better than most pcs can use. 2. GPS using NMEA data streams of variable length can't be very precise. Some models of GPS have option of binary output and can be much better. My Sure GPS output has a mean offset near to 0 ms but range is around +/- 80 ms. There are some variables you may need to set for your GPS make + model + firmware version. Easiest is to set a nearby internet source as prefered peer and gps as noselect. Enable peerstats and use peer_summary. eg. last time I did this # ntp.conf statistics loopstats peerstats sysstats filegen loopstats file loopstats type day link enable filegen peerstats file peerstats type day link enable filegen sysstats file sysstats type day link enable tos minsane 3 tos orphan 10 tos mindist 0.4 server 127.127.20.2 mode 18 noselect # this is custom mode for my Sure gps fudge 127.127.20.2 time2 0.407 flag1 0 refid GPSb server 127.127.22.2 minpoll 4 maxpoll 4 fudge 127.127.22.2 flag2 0 flag3 0 refid PPSb server -4 ntp0.lordynet.org.uk minpoll 6 maxpoll 10 iburst prefer server server server ### peer_summary has lines such as: ident cnt meanrms max 127.127.22.2 1350 0.000 0.014 0.068 127.127.20.2 1350 1.820 19.894 77.191 When you have a reasonable estimate for fudge time2 you can remove the noselect directive. David 2013/9/16 Igor Pavlov pavlov...@gmail.com I already tryed to use PPS from my GPS receiver connected to DCD-pin of the same RS-232. But I had PPS also marked as x, that is why I tryed first to fix problems with NMEA-based GPS data separate from PPS. I will try to connect PPS again. But I can't understand why it is marked x? What is wrong with it? 2013/9/16 Rob nom...@example.com Igor Pavlov pavlov...@gmail.com wrote: Hi! I am using GPS-receiver based on Geos-1m chip ( http://www.geostar-navigation.com/en/navigation_05.html) I connected it to serial port and configured NTP. It becomes unused by NTP: when do ntpq -p reuest ti puts x near GPS_NMEA(1) record. What reasons can be for this? A GPS with NMEA protocol is usually a very lousy time source. You can see this in your output: the time offset relative to the internet sources is very large: remote refid st t when poll reach delay offset jitter == xGPS_NMEA(1) .GPS.0 l 14 16 3770.000 -303.07 4.292 *stratum1.net.PPS.1 u 62 64 377 62.800 -68.052 43.693 +dl120g7.naviteh 194.190.168.12 u 58 64 377 30.151 -100.04 52.432 +89.221.207.113 192.36.133.252 u- 64 377 10.006 -105.88 64.279 That is why ntpd declares the time as invalid and attempts to use the 3 other sources instead. When you want to fix this, you should use PPS with the receiver, when possible. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions -- éÇÏÒØ ðÁ×ÌÏ× ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Trying to use Dimension 4 time keeper
David Taylor wrote: On 15/09/2013 08:09, unruh wrote: On 2013-09-15, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: [] Yes, the Sure unit, another low-cost option, does require a little modification to extract the PPS signal at RS-232 levels, although based That would completely burn out the RPi GPIO ports. Which is why my own recommendation has been to use the Adafruit GPS module, which is 3.3V level compatible with the Raspberry Pi. Here's the URL - again! http://www.adafruit.com/products/746 My Sure gps has both 5V ttl and 3.3V levels available by soldering wires or fitting a pin header. I had tried both the 5V ttl to parallel port and currently using your rs232 modification. I didn't note any significant difference in parallel port vs serial port. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Trying to use Dimension 4 time keeper
W. eWatson wrote: Some settings that may be of interest. NTP servers server 0.us.pool.ntp.org iburst server 1.us.pool.ntp.org iburst server 2.us.pool.ntp.org iburst server 3.us.pool.ntp.org iburst ntp.drift contains 24.793 What about the above? Does the user set the drift, and, if 24.793 is in seconds, why so big? Ntpd sets the drift value and keeps a record in the drift file to be used next time ntpd is restarted. Ntpd can take a long while, hours rather than minutes, to establish a good valu for the drift. Unless you really know what you are doing, you should not tamper with the drift file. Since the computer is obviously linked to the net, it is not necessary to go out there to check the time. You could do it against one of your local machines or whatever via the net. How would that work? Ntpd is both a client and a server so you only have to make sure that you don't have a firewall blocking local access. What time accuracy do you need? 0.1 seconds. A long while back the quality of the motherboard system clocks might have been much better. A few of my 386/486 systems would be much better than 1.0s/day without running ntpd/chronyd or similar. Add to that they usually had a connector to select a remote system clock if needed (this then largely removes offset variation due to system load but not due to ambient temperature changes). If you can run ntpd on your Windows system you should get and maintain better than 0.01 s offsets. As the Meinberg install suggests, you need to disable Windows time service in order to effectively run ntpd. I've not tried SNTP for a long while, ie I was running plain DOS, and often the logs showed no correction was needed (ntp source would be my own server on a Linux, NetBSD or FreeBSD system). My local systems without pps source has offsets within 200 us - 2 ms depending on ambient temperature changes. The pc with gps/pps has mean offset 0.0-1.0 us, rms 4-5 us, maximum 27-37 us. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] GPS/PPS and enable calibrate
Horvath Bob-BHORVAT1 wrote: -Original Message- From: questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org [mailto:questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org] On Behalf Of unruh Sent: Saturday, September 07, 2013 11:20 AM To: questions@lists.ntp.org Subject: Re: GPS/PPS and enable calibrate On 2013-09-07, Charles Elliott elliott...@verizon.net wrote: Or use PPS and be accurate to a microsecond or so. I guess this is the fundamental question I don't understand. I thought with PPS, which I do have using the Adafruit GPS and a Raspberry Pi, I would be fairly accurate off of the GPS time and PPS together. Then I started seeing fudge parameters of 0.496 which seem to work well, but seem like a large amount of time to be fudging for something that is supposed to already be accurate. That is in seconds, right? So it is about a half a second? I am confused what that parameter does, what it needs to be set to, and how one figures out what to set it to, or whether I am just really confused. The default nmea sentences can be different between different devices and even firmware versions. These sentences can be of variable length between polls and at 4800 baud can even be more than a second making use for ntpd impossible. The gps devices can usually be configured to send only a single nmea sentence and/or use a much higher baud rate or use some custom binary format. One of these options along with s fudge time should be able to give a suitable output for use by ntpd but might still have variation between polls of above +/- 50 ms. If your GPS device has a PPS output, that should probably be accurate to better than 1000 ns down to about 20-50 ns. A PC serial interface might be limited to processing an interrupt within around 1 us. My Sure GPS on VIA EPIA i386 gives in ms: mean=0.000-0.001, rms=0.004-005, max=0.027-0.037. Those high values occur when nightly cron jobs are being processed. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] GPS/PPS and enable calibrate
unruh wrote: On 2013-09-07, Horvath Bob-BHORVAT1 bob.horv...@motorolasolutions.com wrote: -Original Message- From: questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org [mailto:questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org] On Behalf Of unruh Sent: Saturday, September 07, 2013 11:20 AM To: questions@lists.ntp.org Subject: Re: GPS/PPS and enable calibrate On 2013-09-07, Charles Elliott elliott...@verizon.net wrote: Or use PPS and be accurate to a microsecond or so. I guess this is the fundamental question I don't understand. I thought with PPS, which I do have using the Adafruit GPS and a Raspberry Pi, I would be fairly accurate off of the GPS time and PPS together. Then I started seeing fudge parameters of 0.496 which seem to work well, but seem like a large amount of time to be fudging for something that is supposed to already be accurate. That is in seconds, right? So it is about a half a second? I am confused what that parameter does, what it needs to be set to, and how one figures out what to set it to, or whether I am just really confused. Teh PPS occurs at the second. The nmea labels those seconds so you know which second the PPS occured on. But the nmea sentences occur late by something like .1 to .6 (or occasionally with a defective GPS 18x, by 1.1 sec) Now you can tell your computer that the nmea occurs say .4 sec late. so that its idea of when the nmea sentece comes through is not on the second but on the second plus .4 sec. It does not really matter, because as long as that labeling is withing 1 sec, ntpd will use PPS to determine when the second occured, that the nmea to say which second that was. Ie, if you use PPS that fudging does nothing about the time your computer shows. So unless your GPS is way out, that parameter is irrelevant. If your PPS is not working, then you make your clock accurate to about .1 sec by using that parameter, rather than .4 sec late. Hi I'd add to that For my Sure GPS on EPIA-i386 running NetBSD-6, I have to set tos mindist to a high value to keep gps syncronised otherwise I can't get gps to sync or eventually lose both gps and pps. from /etc/ntp.conf: tos minsane 3 tos orphan 10 tos mindist 0.4 server 127.127.20.2 mode 18 prefer fudge 127.127.20.2 stratum 6 time2 0.417 flag1 0 refid GPSb ## time2 is set to a high value from when I was initially setting up ## and could now be reduced to perhaps 0.1s as maximum variation in ## gps offset (from peer_summary) is about +/- 80 ms server 127.127.22.2 fudge 127.127.22.2 flag2 0 flag3 1 refid PPSb server -4 ntp0.lordynet.org.ukminpoll 6 maxpoll 7 iburst server -4 ntp2.lordynet.org.ukminpoll 6 maxpoll 7 iburst server -4 ntp1.lordynet.org minpoll 6 maxpoll 7 iburst server -4 ntp3.lordynet.org minpoll 6 maxpoll 7 iburst server -4 ntp1(my isp)minpoll 8 maxpoll 10 iburst from ntp-4.2.6p5/html/miscopt.html: mindist mindistance Specify the minimum distance used by the selection and anticlockhop algorithm. Larger values increase the tolerance for outliers; smaller values increase the selectivity. The default is .001 s. In some cases, such as reference clocks with high jitter and a PPS signal, it is useful to increase the value to insure the intersection interval is always nonempty. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] GPS/PPS and enable calibrate
Horvath Bob-BHORVAT1 wrote: -Original Message- From: questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org [mailto:questions-bounces+bob.horvath=motorolasolutions@lists.ntp.org] On Behalf Of WOLfgang Schricker Sent: Thursday, September 05, 2013 1:08 PM To: questions@lists.ntp.org Subject: Re: GPS/PPS and enable calibrate Horvath Bob-BHORVAT1 schrieb: I am trying to get a raspberry pi GPS-based stratum server functioning and I am confused how to use the enable calibrate function. [...] The server is a raspberry pi with the Adafruit MTK339 GPS chipset. It is running the image from here... http://ntpi.openchaos.org/downloads/ BTW, thanks to all the raspberry pi NTP guys out there that have gotten me this far!! Bob Hi, this runs perfectly for me: http://open.konspyre.org/blog/2012/10/18/raspberry-pi-time-server/. OK, maybe I'll have to try that image. In general though, when it comes to this line... fudge 127.127.20.0 flag1 1 time2 0.496 ... how do you know what value to set for time2? Did you got through the instructions here? http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html ... or are you using 0.496 - what is shown on the http://open.konspyre.org/blog/2012/10/18/raspberry-pi-time-server/ ? I couldn't find a generic method on that page. I have used both Garmin 18x-LVC and a Sure development board and setup both using peer_summary over several days to get a reasonable value for the time2 offset. That value is tied to both the make/model and firmware version of the GPS. My Garmin would wander more than +/- 50 ms so the time2 value used isn't that critical but a large 'tos mindist' might be needed. The method I use is to set a reliable internet source as prefer and have 127.127.20.0 noselect. After a few days take the mean value of the peer_summary output. Last five days of peer_summary for my Sure gps NetBSD-6-i386 via-600MHz ident cnt mean rms max delay dist disp 127.127.20.213500.136 19.639 88.0920.0002.5191.749 127.127.20.213461.358 21.361 79.6710.000 939.1332.980 127.127.20.213500.642 20.467 90.2410.0002.7091.757 127.127.20.213505.020 21.552 70.5080.0002.5281.752 127.127.20.213503.947 22.530 73.1860.0002.3091.714 127.127.22.213500.0000.0040.0320.0000.9300.930 127.127.22.213440.0030.0692.4590.000 938.2572.142 127.127.22.213500.0010.0040.0330.0000.9340.934 127.127.22.213500.0010.0050.0330.0000.9340.934 127.127.22.213500.0010.0040.0310.0000.9340.934 ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTPD silently not tracking
Magnus Danielson wrote: On 09/02/2013 02:33 PM, David Lord wrote: Harlan Stenn wrote: David Lord writes: Magnus Danielson wrote: server ntp1.kth.se iburst maxpoll 7 server ntp2.kth.se iburst maxpoll 7 server ntp3.kth.se iburst maxpoll 7 server ntp1.sp.se iburst maxpoll 7 server ntp2.sp.se iburst maxpoll 7 that seems too restrictive and possibly abusive if you do not yourself have control over those servers. iburst is not abusive. Perhaps you are thinking of burst? I was thinking about maxpoll 7 and the few stats that were given indicating the very poor reach for the configured servers. There is good network connectivity to all 5 servers. If you advice us not to use maxpoll 7, then we naturally will learn from it. I don't use it personally, but I didn't set this machine up. Would be nice to hear your explanation thought. However, when doing the ntpdc peers command (in interactive mode), it had all 5 servers available, and was tracking one (as indicated with = and * at the beginning of the lines, I was told this over phone, so I don't have visual memory of it all). So, I don't think bad connectivity was the cause. It looked to a non-NTP expert like it had peers, was happy with offsets (albeit it looked unexpectedly good at 0) but just was plain way off in time. It took multiples querries with ntpdc peers before it reacted on the time-offset, started to display big offsets and eventually clean up itself. ntpdate -q did expose the time error of 6 days. Hi having a low maxpoll over an internet connection doesn't make much sense. Variable internet delays are better evened out with longer poll intervals. Effect of system temperature variations might demand shorter poll intervals but probably not as low as maxpoll=7. Having seen one of your recent posts it appears that some of your sources might be local and under your control in which case a low maxpoll for them might be understandable. Without real diagnostics I have no idea what could be the cause of the problem. I've certainly never experienced a system that claims to be in sync at the same time as being 6 days off. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTPD silently not tracking
Harlan Stenn wrote: David Lord writes: Magnus Danielson wrote: server ntp1.kth.se iburst maxpoll 7 server ntp2.kth.se iburst maxpoll 7 server ntp3.kth.se iburst maxpoll 7 server ntp1.sp.se iburst maxpoll 7 server ntp2.sp.se iburst maxpoll 7 that seems too restrictive and possibly abusive if you do not yourself have control over those servers. iburst is not abusive. Perhaps you are thinking of burst? I was thinking about maxpoll 7 and the few stats that were given indicating the very poor reach for the configured servers. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTPD silently not tracking
Magnus Danielson wrote: On 09/01/2013 10:42 PM, unruh wrote: On 2013-09-01, Steve Kostecke koste...@ntp.org wrote: On 2013-09-01, Rob nom...@example.com wrote: The NTP Reference Implementation is free software. The copyright holder (The University of Delaware) makes no representations about the suitability this software for any purpose. It is provided as is without express or implied warranty. Please visit http://www.ntp.org/copyright for the complete copyright notice and license statement. Yes, usual legal ass protection. Fortunately ntpd developers usually do not actually either believe that nor act as though they believe that. They tend not to say Oh-- it does not work, tough shit. And you do them, and yourself a disservice by saying that that is what they do. It is not what they or you do. In this case ntpd wandered off by hours with no complaint. That is not a proper behaviour of a professional piece of software. Now it could be that they have the local clock enables, and for some reason ntpd chased that rather than all of the other server sources. Pointing out that they should never actually use the local clock as a source is certainly useful since the clock is never wrong with respect to the local source. But if the computer has 5 outside source available and still chases after the local source that is a bug that should be fixed. If you know some attempt was made to fix a bug like than in a more recent version than the one used by the user, then advising upgrade is appropriate (as is telling him never to use local) As we are coming back to topic... 8--- # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help driftfile /var/lib/ntp/ntp.drift # Enable this if you want statistics to be logged. #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable Hi I'll join in here where is your statsdir? # You do need to talk to an NTP server or two (or three). #server ntp.your-provider.example # pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will # pick a different set every time it starts up. Please consider joining the # pool: http://www.pool.ntp.org/join.html server ntp1.kth.se iburst maxpoll 7 server ntp2.kth.se iburst maxpoll 7 server ntp3.kth.se iburst maxpoll 7 server ntp1.sp.se iburst maxpoll 7 server ntp2.sp.se iburst maxpoll 7 that seems too restrictive and possibly abusive if you do not yourself have control over those servers. My own servers and clients are NetBSD with ntpd 4.2.6p5 except for one client on ntpd-4.2.7p377 iburst is used on my clients but only against servers on my local network and from others where I have accounts. If your clients pointed to my own pool servers they would eventually get KOD or reach would slowly decay. eg. one of my pool servers that is also a local client has: ! tos minsane 3 ! tos orphan 10 ! tos mindist 0.01 ! peer -4 ntp0.lordynet.org.uk minpoll 6 maxpoll 8 iburst ! peer -4 ntp2.lordynet.org.uk minpoll 6 maxpoll 8 iburst ! server -4 ntp1.lordynet.org.uk minpoll 6 maxpoll 8 iburst ! server -4 (friendly isp_1) minpoll 8 maxpoll 10 iburst ! server -4 (friendly isp_2) minpoll 8 maxpoll 10 iburst ! server -4 (other isp_3) minpoll 8 maxpoll 11 ! server -4 (other isp_4) minpoll 8 maxpoll 11 ! server -4 (other isp_5) minpoll 8 maxpoll 11 There are some sane suggestions on the pool website as to how to configure ntpd clients. The only debian based systems I used are Ubuntu but that was only clients and were usually within a few ms offset within 30 min of bootup. I have no idea if they drifted over several days but logs show they keep good time when powered up. Your servers aren't by any chance 'virtual' in which case you should obtain time from your base system. David # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for # details. The web page http://support.ntp.org/bin/view/Support/AccessRestrictions # might also be helpful. # # Note that restrict applies to both servers and clients, so a configuration # that might be intended to block requests from certain clients could also end # up blocking replies from your own upstream servers. # By default, exchange time with everybody, but don't allow configuration. restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery # Local users may interrogate the ntp server more closely. restrict 127.0.0.1 restrict ::1 # Clients from this (example!) subnet have unlimited access, but only if # cryptographically authenticated. # up blocking replies from your own upstream servers. # By default, exchange time with everybody, but don't allow configuration. restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery # Local users may interrogate the ntp server more closely.
Re: [ntp:questions] Acutime Gold
Mark C. Stephens wrote: This is what I had with no time1: remote refid st t when poll reach delay offset jitter == oPPS(0) .PPS.0 l 13 16 3770.000 -0.007 0.005 *GPS_PALISADE(0) .GPS.0 l 12 16 3770.0000.008 0.003 And this is what I get with time1 of 0.015 remote refid st t when poll reach delay offset jitter == oPPS(0) .PPS.0 l 10 16 3770.0000.012 0.005 *GPS_PALISADE(0) .GPS.0 l 10 16 3770.000 15.031 0.008 Seems I have put myself out 15 ms by adding time1 0.015 Also in my ntp.conf I have: saveconfigdir /etc/ntpd however if I do a ntpq -c saveconfig it comes back asking for a filename. Have I not compiled saveconfig mechanism in or something? -Original Message- From: questions-bounces+marks=non-stop.com...@lists.ntp.org [mailto:questions-bounces+marks=non-stop.com...@lists.ntp.org] On Behalf Of E-Mail Sent to this address will be added to the BlackLists Sent: Friday, 16 August 2013 1:43 PM To: questions@lists.ntp.org Subject: Re: Acutime Gold Mark C. Stephens wrote: If I have palisade prefer PPS comes up fine within a minute or so. When I tried making pps prefer it got an x beside the PPS. I waited for an hour or 2 but it was still marked bad. Not sure what's going on there.. this is the relevant part of the config: # PPS server 127.127.22.0 minpoll 4 maxpoll 4 # prefer # noselect fudge 127.127.22.0 flag2 0 flag3 1 flag4 0 # time1 0.16 # palisade on ttyS0 server 127.127.29.0 minpoll 4 maxpoll 4 prefer fudge 127.127.29.0 flag2 0 # time1 0.15 fudge 127.127.29.0 time1 0.015 # milli-seconds, not micro-seconds As you can see I have tried different time1 for both clocks. You don't need to get a very accurate time from the GPS as the PPS when present sets the offset. Some GPS are a disaster when used to set a clock and several of my devices have variations of +/- 50 ms. Your GPS_PALISADE is very accurate by comparison. eg. fudge 127.127.28.0 stratum 4 time1 0.024 refid MSFa fudge 127.127.20.2 stratum 6 time2 0.417 refid GPSb Note that I don't really want either to be used for offset as neither is as good as internet time. If you really want to fudge out the time offset of GPS_PALISADE you would need 0.08 (s) or better run peer_summary for a while so you can get an average in case that value varies. David I am not familiar with the mindist option. tos mindist 0.020 -- E-Mail Sent to this address blackl...@anitech-systems.com will be added to the BlackLists. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Acutime Gold
David Lord wrote: Mark C. Stephens wrote: This is what I had with no time1: remote refid st t when poll reach delay offset jitter == oPPS(0) .PPS.0 l 13 16 3770.000 -0.007 0.005 *GPS_PALISADE(0) .GPS.0 l 12 16 3770.000 0.008 0.003 And this is what I get with time1 of 0.015 remote refid st t when poll reach delay offset jitter == oPPS(0) .PPS.0 l 10 16 3770.000 0.012 0.005 *GPS_PALISADE(0) .GPS.0 l 10 16 3770.000 15.031 0.008 Seems I have put myself out 15 ms by adding time1 0.015 Also in my ntp.conf I have: saveconfigdir /etc/ntpd however if I do a ntpq -c saveconfig it comes back asking for a filename. Have I not compiled saveconfig mechanism in or something? . You don't need to get a very accurate time from the GPS as the PPS when present sets the offset. Some GPS are a disaster when used to set a clock and several of my devices have variations of +/- 50 ms. Your GPS_PALISADE is very accurate by comparison. eg. fudge 127.127.28.0 stratum 4 time1 0.024 refid MSFa fudge 127.127.20.2 stratum 6 time2 0.417 refid GPSb Note that I don't really want either to be used for offset as neither is as good as internet time. If you really want to fudge out the time offset of GPS_PALISADE you would need 0.08 (s) or better run peer_summary for a while so you can get an average in case that value varies. Hi from my peer_summary identmean(ms) rms max(ms) 127.127.22.2 (.PPSb.) 0.000 0.0040.004 127.127.20.2 (.GPSb.) -0.125 20.180 69.578 Peer and loop summary are scripts from the ntp distributions. 4.2.6p5 has both a perl and .sh versions. David ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Sudden change in precision and jitter
A C wrote: Old thread but new data coming up. After running for a nice while ntpd finally spun out of control as I've described before. It swung the clock around and then finally stopped doing anything. When I finally restarted the clock was over 90 seconds off (the appropriate log entry here): Aug 10 16:23:02 sunipx2 ntpd[23542]: 0.0.0.0 c41c 0c clock_step -95.543901 s I have all stats files turned on so below is a link to a combined file from the configuration, main log, peers (both filtered for ATOM and SHM and an unfiltered version), clockstats, loopstats, sysstats, and rawstats for the time period when the system spun out. Perhaps any of you can spot something that I'm overlooking in these files. Everything works great and then it collapses very quickly (within one or two polling cycles at most). http://acarver.net/ntpd/combinedlogs20130810.txt If you need/want more data just say so. On 6/2/2013 13:43, A C wrote: On 6/2/2013 13:20, unruh wrote: On 2013-06-02, A C agcarver+...@acarver.net wrote: On 6/2/2013 02:24, David Woolley wrote: A C wrote: That would be interesting since I have a cron job restarting it at an odd hour away from any other cron jobs left. I'll check and see if Why are you restarting it? ntpd works best if left to run continuously. I know it does...unless there is a bug (a compound bug between ntpd and the kernel) that causes ntpd to spin out of control every few weeks and forces me to restart it anyway. By spin out of control I do mean that CPU usage goes to near 100% and ntpd stops disciplining the clock after it managed to force the clock to run at some insane rate (e.g. nominal PPM tick adjustment might be -78 and it ramps the tick to +350 PPM over a few minutes). The end result is that the clock is very wrong, ntpd has totally stopped doing anything, but somehow it's caught in an infinite loop with maximum CPU usage meaning almost nothing else on the system is working right. I have a remote system that watches the billboard from this instance of ntpd (by running ntpq -p IP from another machine) and when the problem happens you can see all the offsets are in the tens of thousands and the log file indicates a series of moderate (less than one second) clock spikes and clock_syncs followed by either enough of a shift that ntpd stops bothering to fix the clock (deselects all peers and sits) or an absurd calculated clock step of approximately 2^32 - 1 seconds even though the clock itself is actually only out by tens or hundreds of seconds at most (the initial clock step correction applied when ntpd restarts has never been more than 200 seconds). And before anyone says anything, the machine/clock is not broken. It keeps very good time (offset from PPS is typically less than 30 microseconds) right up until some event trips the bug. At that point ntpd starts hunting and stepping the clock back and forth (four to five clock spike_detects within a period of less than five minutes) and the crash. After I restart it, everything settles back down and stays fine for several weeks. A few weeks later everything repeats. The timing between the repeats is not exact, sometimes it happens in three weeks, sometimes in five. Once in a great while it has happened within days of a restart but that is rare. Three to five weeks of run time before the bug appears is the common failure mode. Do you have all logging set up (peerstats, loopstats, refclocks, ) so you can post the contents of those files around the time that ntp goes mad? It sure should not be doing that. Yes, all logging is turned on. Main, peer, loop, clock, sys, and raw. I'll post to this thread next time it takes off. I've been trying to track this bug down for a long time with no luck so far. Hi what hit me was your tos minsane 1 Both my GPS and MSF sources I'm told cannot be blacked out by weather conditions but I also see flying saucers. ntp2.lordynet.org.uk has been in the pool since late 2009: # ntp.conf tos minsane 3 tos orphan 10 tos mindist 0.01 # radioclkd2 -s timepps tty00:-dcd server 127.127.28.0 fudge 127.127.28.0 stratum 4 time1 0.024000 refid MSFa # 13062901 peer -4 ntp1.lordynet.org minpoll 6 maxpoll 7 iburst peer -4 ntp3.lordynet.org minpoll 6 maxpoll 7 iburst server -4 ntp0.lordynet.org.uk minpoll 6 maxpoll 7 iburst server -4 x minpoll 6 maxpoll 7 iburst prefer server -4 x minpoll 8 maxpoll 12 iburst server -4 x minpoll 8 maxpoll 12 iburst server -4 x minpoll 8 maxpoll 12 server -4 x minpoll 8 maxpoll 12 server -4 x minpoll 8 maxpoll 12 # ntpq -c rv -p associd=0 status=061d leap_none, sync_ntp, 1 event, kern, version=ntpd 4.2.6p5-o Wed Feb 1 07:49:06 UTC 2012 (import), processor=i386, system=NetBSD/6.1_STABLE, leap=00, stratum=2, precision=-18, rootdelay=0.695, rootdisp=411.242, refid=192.168.59.61, reftime=d5b0fec3.f491b27b Sat, Aug 10 2013 18:02:43.955,