[ntp:questions] PSYCHO PC clock is advancing at 2 HR per second

Ron Frazier (NTP) timekeepingntplist at c3energy.com
Wed Mar 21 00:00:57 UTC 2012

On 3/20/2012 5:19 PM, David Lord wrote:
> Ron Frazier (NTP) wrote:
>> Hi David L,
>> See below.
>> On 3/20/2012 1:00 PM, David Lord wrote:
>>> Ron Frazier (NTP) wrote:
> ....
>>>> Hi David T,
>>>> Eventually, I do plan to have the server preferences as follows:
>>>> Time server machine:
>>>>    GPS
>>>>    Internet as backup
>>>> Hypothetically speaking, what if I don't want it to distribute time 
>>>> if it's working in internet mode?
>>> Easy, configure it that way.
>> I'm not sure how to do that within the confines of ntp.conf.  David 
>> T. suggested I could run a Perl script every minute to shut down NTP 
>> if the GPS fails.  But, I'd rather keep NTP running and just not 
>> distribute time on the LAN when my time server is polling the 
>> internet.  Which brings up a question.  If my time server on my LAN 
>> is attached to the GPS, that GPS is considered stratum zero and my 
>> time server on the LAN appears to be a stratum 1 device to other 
>> computers, right?  Then, what if the time server stops using the GPS 
>> and begins using internet stratum 2 servers as it's time source?  
>> Does my LAN time server now present itself as a stratum 3 device to 
>> the other PC's on the LAN?  If so, they might automatically stop 
>> using it and poll the internet stratum 2 servers themselves.  That 
>> would be fine.
> "ntpd" is not designed to be restarted often, either by
> scripts or by reboot to another operating system. If that
> is your requirement use ntpdate to get you perhaps within
> a second.
> Ntp.conf provides options to limit responses from ntpd.
> That begs the question, was your ntpd answering requests
> when your server was 50 seconds out?

I don't currently have a server set up.  I'm only testing on the one 
computer at the moment.

>>>> Non time server machines
>>>>    GPS (if attached)
>>>>    Local time server (if available)
>>>>    Internet as backup
>>>> However, I only plan to do that after thoroughly testing the GPS by 
>>>> itself for a week or two to see if it's stable.  I originally had 
>>>> the internet servers on with this unit.  It completely surprised me 
>>>> by having this tendency to drift apparently and have periodic heart 
>>>> attacks.  Unfortunately, this odd behavior may exist in all SIRF 
>>>> III and possibly other SIRF units.  It was only by turning off the 
>>>> internet servers that I was able to get some clean graphs of 
>>>> exactly what the GPS was doing.  When I had the internet servers 
>>>> enabled, once the GPS starting acting odd, which it shouldn't do at 
>>>> all, NTPD would clock hop 
>>> NMEA gives me around +/- 10ms mean, 20-30ms rms and
>>> 40-80ms maximum
>>> PPS gives me around 0.000ms mean, 0.004ms rms and
>>> 0.015-0.035ms maximum
>>> Attempting to compare time vs NMEA offset doesn't get
>>> you anywhere.
>>> There are more productive ways of spending your time
>>> such as sorting out your wireless network or having a
>>> wired link to one pc to confirm if the delays you're
>>> seeing are due to the wireless network or your provider.
>>> David
>> The first thing a timekeeping newbie like me hears when asking about 
>> accurate PC timekeeping is "go hang a GPS on it".  So, back when I 
>> started experimenting in January, and without the benefit of 2 months 
>> of banging my head on this wall and all these discussions, I go to 
>> Amazon, find a cheap GPS with good reviews, and buy it.  I hook it 
>> up, configure NTP, and start getting + / - 10 ms of offsets of the PC 
>> versus GPS time.  Since I think GPS time = UTC time, for most 
>> practical purposes, I'm happy.  For my particular purposes, + / - 10 
>> ms is fine.  I plan to 
> Your perception of GPS time was understandably wrong.
>> pursue PPS mostly for learning reasons, but I don't have to have 
>> microsecond level accuracy.  I just want my PC's clocks to be right 
>> to less than 500 ms but would really prefer less than 10 ms.  I also 
>> want to be doing better than the + / - 50 ms I'm getting from the 
>> internet at the moment.  Another goal of having the GPS was possibly 
>> to poll the internet less often.  Now, only after 2 months of head 
>> banging and discussions, do I find that the NMEA data is wandering.
> My NMEA time data wanders.
> It is not broken, the NMEA spec is for the time data to be
> accurate to within one second.
> If you require millisecond offset from GPS you need to use
> PPS which will give timing within a few microseconds.
> Otherwise if you still want to use NMEA rather than internet
> servers you need to configure ntpd to accept the larger
> variations in offset without dumping the source as
> false-ticker.
> David
>> So, since I could live with NMEA only if it didn't wander, even 
>> though it only give + / - 10 ms accuracy, the question on my mind is:
>> Does only this GPS wander?  Evidence is no.  Others wander.  David T 
>> mentioned a wandering Garmin and someone on another list mentioned 
>> another SIRF unit that does it?
>> Do all SIRF GPS's wander?  Very possible, but evidence that I have is 
>> inconclusive.
>> Do all NMEA outputs on all GPS's everywhere wander?  I don't know 
>> about that.
>> I think it's important to have this discussion, and I think it's 
>> important that it goes on these public lists.  If it turns out to be 
>> true that almost no GPS with NMEA only output, or with PPS but that's 
>> not used, will ever provide more than 100 ms peak - peak accuracy, 
>> then that's important to know.  Now, if that 100 ms performance is 
>> consistent, then it may be adequate for some applications.  It would 
>> even be adequate for mine, if it weren't for the darned heart attacks 
>> this particular unit seems to have.  However, 100 ms doesn't get me 
>> anything that I can't get with internet, so why bother?  It could 
>> still be used in places where internet connectivity is not available 
>> or is intermittent.
>> If, on the other hand, there are some GPS's with NMEA only output 
>> that can consistently provide + / - 20 ms accuracy or so, then I 
>> think that's important info too.
>> Keep in mind, many computers don't have serial and never will, other 
>> than serial - USB converters.
>> It's good that we get the information out there so other newbies 
>> researching the issue can zone in on what's possible to do.
>> Speaking only regarding Windows systems for a moment:
>> So, let's say a person needs + / - 100 ms performance from UTC.  He 
>> can use the internet, even with wireless, and multiple routers, like 
>> I have.  Or he could use even a USB only GPS if there is a reason.
>> Say he needs + / - 20 ms performance.  Internet may be an option 
>> depending on the circumstances.  GPS might be a better option 
>> depending on the GPS.
>> Say he needs + / - 1 ms performance.  Internet is probably not an 
>> option, at least in my experience and my location.  USB only GPS with 
>> PPS through the serial - USB converter might work.  Serial GPS with 
>> PPS would work.
>> Say he needs + / - 20 us performance.  Excluding the realm of 
>> rubidium standards and such, serial GPS with PPS is probably the only 
>> option.
>> So, the more this information is threshed out and clarified, the more 
>> I can evaluate what options I have for my minimal needs, and the 
>> better I can point someone in the right direction if I'm asked about 
>> it, either professionally or personally.  Also, the more other 
>> newbies starting to explore such things will be able to make the 
>> right decision with less headaches.  If there were a USB GPS with PPS 
>> support through DCD messges was already available, one such as myself 
>> could jump right to the + / - 1 ms realm, and forget the rest unless 
>> he need to go to + / - 20 us.  That's what the people on the 
>> thumbgps-devel group (Eric Raymond et al) are working on.
>> Sincerely,
>> Ron
>>>> to the internet.  Normally, that would be OK.  However, as 
>>>> discussed previously, even my errant GPS is more accurate over the 
>>>> short term than the internet for me.  With the internet conection, 
>>>> I get + / - 50 ms variations in time over a span of an our.  With 
>>>> the GPS, I get + / - 60 ms variations over several days, with a few 
>>>> wild corrections during its heart attacks.  Those are two bad 
>>>> choices, but I think I'd still rather run on the GPS.  The only way 
>>>> I can prevent clock hopping is by noselecting the internet 
>>>> servers.  Even if I end up with internet servers turned on, which I 
>>>> expect to, I think it's much better to know about these GPS 
>>>> anomalies before putting it into long term service.  Anybody 
>>>> considering using a SIRF III or maybe even any SIRF unit for 
>>>> timekeeping should be warned by my experience, test the unit, and 
>>>> make sure it's up to the task.  These problems could even affect 
>>>> SIRF units with PPS outputs, although I don't know.  I'll probably 
>>>> decommission this unit from timekeeping duty and relegate it to 
>>>> navigation duty, although I'm not sure how trustworthy it is for 
>>>> that when it's throwing a temper tantrum.
>>>> I've already committed to getting better (hopefully) equipment.  
>>>> (Shipping from Hong Kong or where ever seems to take a LONG time 
>>>> when you're waiting on something.)  Hopefully, the Sure board will 
>>>> be much more stable and reliable.  I'm planning to do the same 
>>>> extensive testing on the Sure for a week or two.  I'll start out 
>>>> just plugging the Sure into my serial - USB converter using the 
>>>> same com port as the Globalsat unit was running on.  I want to see 
>>>> how it does with NMEA only data for a while.  I'm hoping NOT to see 
>>>> substantial drifting from UTC and NOT to see any heart attacks 
>>>> every few days.  I expect lots of jitter, since a number of 
>>>> variable length sentences are being output.  Then, I plan to turn 
>>>> off all but GPGGA and test some more, and maybe tinker with the 
>>>> baud rate.  Then, if I can solder the board without killing it, 
>>>> I'll engage PPS through the serial - USB port and test that for a 
>>>> while.  Then, I'll try it with PPS and real serial on my other 
>>>> computer, the only one with a serial port.
>>>> Hopefully, when I'm done, I'll have a qualified unit running stably 
>>>> and accurately for the whole network to use.  I've acquired a case 
>>>> and some hardware to mount the device similar to yours.  Once I 
>>>> learned that it was only 3" x 3", that made me nervous as far as 
>>>> soldering and all, but we'll see what happens.
>>>> By the way, do you think I should update to Dave H's latest 
>>>> binaries?  I'm at 4.2.7p259 on Windows.  Almost all these 
>>>> discussions have been about Windows.  Linux is a whole other 
>>>> ballgame.  The NTPD there from the repositories is about 2 years 
>>>> old, and I'm reluctant to go outside the repositories because of 
>>>> the numerous problems it creates.  One very serious Linux user on a 
>>>> local message board said even he doesn't compile his own programs 
>>>> because of possible problems.  I tried it once and all sorts of 
>>>> scripts and file locations that Ubuntu expects got broken.
>>>> Sincerely,
>>>> Ron


(PS - If you email me and don't get a quick response, don't be concerned.
I get about 300 emails per day from alternate energy mailing lists and
such.  I don't always see new messages very quickly.  If you need a
reply and have not heard from me in 1 - 2 weeks, send your message again.)

Ron Frazier
timekeepingdude AT c3energy.com

More information about the questions mailing list