Re: [ntp:questions] Using PPS
Yep. My bad. Definitely the GPIO port. Pk On 28/12/2012, at 5:45 PM, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: On 28/12/2012 06:53, Kennedy, Paul wrote: [] I use the type 20 driver on my pi, and PPS to the GPIO boards works a treat with an $RMC or $ZDA string. regards pk That's helpful to know, Paul. Do you mean ports rather than boards, or are you using an add-on board? What modifications did you make to the kernel to get the PPS detected? -- Cheers, David Web: http://www.satsignal.eu ___ 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] Using PPS
-Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of David Taylor Sent: Friday, 28 December 2012 2:33 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Using PPS On 28/12/2012 00:15, Joshua Small wrote: Hi David, Thank you for this. I guess this leads me to the question of how do I debug this, since I seem to have neither of those features listed. I do note that your example uses the ATOM driver 22, whereas several pages have referred me to using the driver 20 as a better option - was this a bad move? I did have to compile my own kernel as I added other modules not present in the precompiled kernels featuring the PPS pi@raspberrypi ~ $ ntpq -p remote refid st t when poll reach delay offset jitter == *GPS_NMEA(0) .GPS.0 l4810.000 -27.038 0.004 +wombat.osoal.or .GPS.1 u1 641 43.639 144.936 1.213 warrane.connect 130.95.179.802 u1 6415.842 144.114 0.574 +203.192.179.98 223.252.32.9 2 u2 641 21.483 103.720 1.765 pi@raspberrypi ~ $ ntpq -c rv associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync, version=ntpd 4.2.7p334@1.2483-o Mon Dec 17 22:19:03 UTC 2012 (1), processor=armv6l, system=Linux/3.2.27+, leap=00, stratum=1, precision=-18, rootdelay=0.000, rootdisp=1028.296, refid=GPS, reftime=d4875ebc.1c973e69 Fri, Dec 28 2012 10:56:44.111, clock=d4875ebd.51aa5e49 Fri, Dec 28 2012 10:56:45.319, peer=1115, tc=3, mintc=3, offset=-36.735257, frequency=-14.904, sys_jitter=47.867458, clk_jitter=58.208, clk_wander=0.000 (the somewhat large offset is due to the fact I only turned this on two seconds before running the command.. they do level out) I'm running dev version 4.2.7p334, I also tried stable 4.2.6p5 with no difference. Joshua, The fact that you don't have the o as the tally code (ntpq -p) and the lack of kern (ntpq -c rv) says that PPS isn't working. My understanding (and I am open to correction) is this: - the type 20 driver can detect PPS transitions on the DCD RS-232 line, and can timestamp those. - the type 22 driver relies on the OS detecting the PPS transition time, via PPS built into the kernel of the OS. - in the Raspberry Pi, there is no DCD line, and hence no DCD timestamp, and hence the type 20 driver will not detect the PPS transitions. - in the Raspberry Pi, there is direct I/O supported for some of the GPIO pins, and one extension to the basic OS has been to use one of those pins for PPS support. This requires both a different kernel, and a module driver add-on. That's why I used the type 22 driver rather then type 20. -- Cheers, David Web: http://www.satsignal.eu ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions I use the type 20 driver on my pi, and PPS to the GPIO boards works a treat with an $RMC or $ZDA string. regards pk ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] What is the NTP recovery time from 16s step inGPSserver?
That is one description. Another would be it is a fully functional linux computer with LAN, HDMI, SVideo, Audio, USB, Serial, and a GPIO bus with the footprint of a credit card, no moving parts which draws only 2-3 watts for US$35. My pi units run various processes such as NTP, web hosting and data IO at a fraction of the cost of conventional hardware. Step changes in computing technology are pretty rare. Having developed on them a couple of months, I put the pi into that category. Oh yes, and the silence of the pi's is worth the US$35 alone. It really depends if you prefer your glass to be half full or half empty ;-) regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of David Woolley Sent: Friday, 2 November 2012 12:32 AM To: questions@lists.ntp.org Subject: Re: [ntp:questions] What is the NTP recovery time from 16s step inGPSserver? unruh wrote: Interrupt latencies in my measurements tended to be at the one or 2 microsecond level. (drive a pin on the parallel port up, measuring when The Raspberry Pi is basically a headless PDA, using smart phone type processors. It is optimised for power consumption, not speed. ___ 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] What is the NTP recovery time from 16s step in GPSserver?
Dave, I believe the answer to your question is 12.5 minutes. This is the time it takes to receive the full set of 25 almanac frames, which contains the GPSTime/UTC offset (amongst other things). http://en.wikipedia.org/wiki/GPS_signals#Almanac regards pk ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] Using Trimble TSIP under Linux
Dave, ntpd will be in /usr/bin or /usr/sbin. On my pi the /usr/sbin is the one in use. Just copy across your newly built binary and restart with a sudo /etc/init.d/ntp restart you can always kill the ntpd process (with a sudo ps -e | grep ntpd followed by sudo kill -9 processname), then run the one you bult interactively to make sure all is well. The debug offerings are really handy in the interactive mode. pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of David Taylor Sent: Monday, 29 October 2012 5:11 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Using Trimble TSIP under Linux On 29/10/2012 08:38, Rob wrote: David Taylor david-tay...@blueyonder.co.uk.invalid wrote: - use sudo ppstest /dev/pps0 and see assert pulses coming in (the clear field is always 0 though, perhaps the 150 microsecond pulse is too narrow?) That is a problem! Now I remember... I tried different GPS receivers when writing the code for the PPS support in gpsd, and there was a receiver for which it would not work because the pulse is too narrow for the technique used in gpsd. It was the Trimble, I remember now. You need to add a circuit to stretch the narrow pulse into a 100ms pulse. The exact duration is not important. Just arrange for a monostable multivibrator that gets triggered by the rising edge of the pulse and extends the pulse by R/C time. Make sure the pulse is shorter than 500ms or the autodetection logic will focus on the wrong edge of the pulse. Thanks, Rob. For the moment I have decided to use the pps-gpio code which has been written for the Raspberry Pi, rather than the gpsd route. This is producing valid data when running the ppstest (although the entries of 0 in the clear values worry me slightly), and from the NTP log I believe that the version I have may not have ATOM support. I've recompiled NTP, and am thinking about installing it I really would prefer not to have to add extra hardware at this point. -- Cheers, David Web: http://www.satsignal.eu ___ 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] Using Trimble TSIP under Linux
Hi I did not encounter this, but I would try the following... ps -e | grep ntpd To see if ntp is accidentally running already sudo chmod 777 /usr/sbin/ntpd To make sure the root user (that's the one who runs 'services' has permission to run ntpd. My guess is the latter. If you get more grief from the atom driver, maybe try the NMEA RMC. Works a treat for me. Good luck Pk - Original Message - From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org questions-bounces+p.kennedy=fugro.com...@lists.ntp.org To: questions@lists.ntp.org questions@lists.ntp.org Sent: Mon Oct 29 18:45:21 2012 Subject: Re: [ntp:questions] Using Trimble TSIP under Linux On 29/10/2012 09:44, Kennedy, Paul wrote: Dave, ntpd will be in /usr/bin or /usr/sbin. On my pi the /usr/sbin is the one in use. Just copy across your newly built binary and restart with a sudo /etc/init.d/ntp restart you can always kill the ntpd process (with a sudo ps -e | grep ntpd followed by sudo kill -9 processname), then run the one you bult interactively to make sure all is well. The debug offerings are really handy in the interactive mode. pk Making progress, Paul, thanks! I managed to get gpsd to autostart with the dpkg-reconfigure, but on ntp it said: ntp is broken or not fully install. I still says that after I copied the ntp executables from my local directory to /usr/bin. On trying to restart ntp it failed: pi@raspberrypi ~ $ sudo /etc/init.d/ntp restart [ ok ] Stopping NTP server: ntpd. [] Starting NTP server: ntpd/usr/sbin/ntpd: The ``user'' option has been disabled -- built without --enable-clockctl or --enable-linuxcaps ntpd - NTP daemon program - Ver. 4.2.7p314 USAGE: ntpd [ -flag [val] | --name[{=| }val] ]... \ [ server1 ... serverN ] failed! but trying to run ntpd from the command-line it works correctly: pi@raspberrypi ~ $ sudo /usr/local/bin/ntpd pi@raspberrypi ~ $ and continues to run after I log out, with excellent PPS support. I took all the defaults when building NTP and set no special options myself. What have I done wrong now!? -- Cheers, David Web: http://www.satsignal.eu ___ 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] NTP tunning for OWD measurements
Pedro, Unruh makes some good points here. Here is a good start point ntp.conf to get the stats logged at each server... #@Pedro, this section will log some ASCII stats of the clock quality. # You can easily plot them in scipy or your tool of choice. This is your 'baseline' for quality assurance. # /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 sysstats filegen loopstats type day link enable filegen peerstats type day link enable filegen sysstats type day link enable #@Pedro, chance this to your servers S1, S2. As you are on a known network, and conducting controlled experiments, I would strongly advise you to NOT use internet (pool) NTP servers. #@Pedro, make a decision on the prefererred server and make it so server S1 iburst minpoll 3 maxpoll 4 prefer #@Pedro, set the other servers to 'noselect', which means you will gather the stats, but the various test sites will never flip to them, which would screw up your tests. server S2 iburst minpoll 3 maxpoll 4 noselect PkBy controlling which refclocks the various test sites use, you should see they synch up well enough. We do this regularly. Unruh makes a very good point on the delay Vs Offset. You should certainly be doing this as it will reveal your QoS. PkI would also make time series plots of Time Vs Offset with all the test sites in the same plot. This will give you an idea of synchronisation over your measurement period. They are very easy to make in python / excel. PkUnruh also make a good point on the use of GPS, but if it is not available, then you need to sit (and recognise you are sitting) in the 2nd class seats. It will be important to identify and understand the signal from the noise. If your clock offset are out by milliseconds, then you can only hope to measure 1 way delay better than milliseconds, but if they are good to microsecond, then you might get meaningful results. PkGood luck, and I hope this helps. Regards Pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of unruh Sent: Saturday, 27 October 2012 8:42 AM To: questions@lists.ntp.org Subject: Re: [ntp:questions] NTP tunning for OWD measurements On 2012-10-26, pret3n...@gmail.com pret3n...@gmail.com wrote: An NREN is a National Research and Education Network. We are talking about 26 servers spread all over the country and in the islands, so your figures are a bit off, I'm afraid. $50 don't cover the expenses associated with getting a GPS for every single server, and like I said before, it's simply undoable. And I'm just a student, I don't get any payment for this, instead I pay my tuition - as I should. But this is getting out of subject :-) Agreed. It is your supervisor that should pay for that. I suspect that you will discover that there is a huge (millisecond level) jitter in the network. As was suggested, your first thing to do, before doing anything else, should be to get ntpd running on all the machines ( you probably already have it) making sure that the measurements log is active statistics peerstats in /etc/ntp.conf with the servers being those level 1 servers you mentioned. Then after a few days of running, plot the offset against the delay, and look at that graph. You may well notice wings on that graph with slope of 1/2 . Those are asymmetric delays. The spread of the central blob will also give you an idea of the noise on your connection. Now with that information, you can begin to make plans and to know what kind of errors to expect, and to compare them with the requirements. Then, get your supervisor to put out for a a few gps receivers, wire them up so that they can simply be plugged in, and send them to the IT guys at the a few of the sites. Set up ntp to use pps on those sites, and now you can accurately determine the one way delays between those sites. You can now get an estimate of the assymetry of the connections, and compare that the overall network noise. Anyway, thanks for your remarks and suggestions. Pedro On Saturday, October 27, 2012 12:31:28 AM UTC+1, unruh wrote: On 2012-10-26, pret3n...@gmail.com pret3n...@gmail.com wrote: Hi all, and thank you for your answers. I'm afraid I might not have been clear about my objectives, so I'll try to explain clearer. I'll also try and keep the lines smaller, and please, excuse me if I make any mistakes, as english is not my native language. This project involves a NREN, which interconnects several institutions. Whatever and NREN is. The current architecture is as follows: two main servers (let's call it S1 and S2) placed in the NREN infrastructure at two different places in the country, and several servers (X1, X2, Xi) placed at the edge
Re: [ntp:questions] Using ntpd with custom clock
Forgive me if I am wrong, but this is a very odd request. As far as I can tell, the request is for the NTP corrections to the system clock to be used to correct a different clock. I cannot quite understand how this is of practical use. It is like diagnosing the faults on your car engine and then applying the corrections to a train engine. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of Rob Sent: Wednesday, 17 October 2012 3:06 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Using ntpd with custom clock Chuck Swiger cswi...@mac.com wrote: Hi-- On Oct 16, 2012, at 2:49 PM, Felipe Blauth wrote: 2012/10/16 Brian Utterback brian.utterb...@oracle.com I think the original poster is asking to do something a little bit different than the usual. If I am reading it right, he is not asking how to get ntpd to read a custom clock as a source of time (which as noted is what a refclock is for). I think he is asking how to get ntpd to *set* a custom clock, treating it as it would the system clock, so as to sync the custom clock with the upstream NTP server time. That's exactly what I want to do. OK. You can either hook into ntpd's calls to get/settimeofday() and adjtime() as you initially suggested, or perhaps look into the SHM driver. The latter is a generic interface that puts clock timestamps into shared memory; but you can read from SHM instead of writing, if you like-- would be easier if you have something like a GPS receiver and gpsd populating the SHM timestamps. Funny that, after you initially seem to indicate that you have understood the question, you still come up with the SHM driver that is a REFERENCE CLOCK driver, not an ADJUSTMENT CLOCK driver. ___ 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] Using ntpd with custom clock
Hi, Apologies if I upset you. I responded as I wish to provide assistance, but either I do not really understand the question or the question is rather too vague (for me at least). A little more detail may well generate rich returns from some pretty experienced folks (for free). I believe that is called a conversation. Quite popular in the old days. In my experience, keeping the conversation friendly usually gets a better outcome. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of unruh Sent: Wednesday, 17 October 2012 5:34 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Using ntpd with custom clock On 2012-10-17, Rob nom...@example.com wrote: Kennedy, Paul p.kenn...@fugro.com.au wrote: Forgive me if I am wrong, but this is a very odd request. As far as I can tell, the request is for the NTP corrections to the system clock to be used to correct a different clock. I cannot quite understand how this is of practical use. It is like diagnosing the faults on your car engine and then applying the corrections to a train engine. When it is an odd request in your opinion, it does not mean it is not valid. It may explain why there is no standard code in ntpd to handle this situation, but it is no excuse to give wrong answers or boilerplate answers. It happens so often on this group. There are two questions that very frequently pop up: - I want to test and validate how ntpd handles an unusual situation (like a fault or a leap-second) - I want to keep an island of sytems synchronized to the same time (but I don't care how that time relates to UTC) All the time we see those responses that declare the question as odd, or try to modify the requirements of the poster, or add a new piece of hardware (like a GPS receiver). And usually the responses are from the same small group of posters. It is really lame. When you cannot answer the question, you can always keep quiet. There is no need to always jump on the soapbox. And since you did NOT give an answer to the poster, why did you not keep quiet? As far as I know ntpd does not handle the sitution that the poster apparently wants to handle. He will need to write code to use something ( the system clock, the output from a gps, the data from an ntp server) to discipline his external hardware clock. If the clock allows its rate to be changed, this should not be too hard. If it does not, it will be more difficult. But we have no idea what the OP really wants. He has been very very skimpy in telling us. ___ 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] NTP client configuration
Ben, you have not yet stated what OS you are using. I think we need to know the flavour of windows you are using. If I read the mail thread, I see you have the following issues... 1. You have a problem with startup being too slow to achieve acceptable synchronisation. 2. Your windows boxes sometimes drift off a long way compared to the server. 3. You are now looking to patch up a poorly designed framework with software hacks to step the clocks back into alignment rather than fix the root cause of your troubles. My advice would be as follows... A. Decide what your startup AND synch criteria are (and let us know). If it cannot be met, you are wasting your time with NTP, and need to look elsewhere. B. Forget using localhost as a time source. More trouble than it is worth. C. Get a stable time source for your server. If you have internet, use it. If not, get a GPS based server and use it. As a rough guide, A Windows server will give you milliseconds quality reference clock. A Linux box will give you a Microseconds quality reference clock. D. Sort out your client PC's install of NTP. They are clearly not well installed or configured at this time. E. Monitor your client PC's (and indeed the server PC) over both the long term (days) and short term (minutes) to confirm both the startup time from boot and the stability are acceptable under regular use. Apologies if this is a little prescriptive and blunt (in my defence, I am a Yorkshireman), but we are a windows shop and have great success with ntp. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of unruh Sent: Friday, 28 September 2012 5:20 AM To: questions@lists.ntp.org Subject: Re: [ntp:questions] NTP client configuration On 2012-09-27, Benjamin CABUT benjamin.ca...@rsacosmos.com wrote: Hello, I don't car in my application to have the correct UTC time. What I care is that all my computers share exactly the same time. Our application is not connected to internet. So only time I can use as a reference is local clock of one computer. OK, look up orphan mode. But again why are you suing a windows machine as your reference? Windows is not known for its timekeeping ability. Use for example one of your Linux machines instead. I can realy tell you that my client is not sync some times! it happen in 2 ways: - when I start my computers, it need arround 5 minutes to be sync, it is a problem for me ntpd is NOT designed for rapid convergence. 5 min is very fast as far as ntpd is concerned. - when one computer has heavy operation to do, then ntp client desync What do you mean when one computer? The server? a client? And what is a heavy operation? and I have offset that can be 2 seconds, and stay like this during sereval minutes. You have other problems. ntpd is NOT designed to correct clocks which jump around by seconds. You need to get your clocks to behave themselves first so that their time does not jump around. so It realy need a long time to ntp client to detect the big desync. I do not want to rewrite ntp. ntpq gives the offset between clock of client and clock of server. As you say the best way for me is that ntp is working perfectly, but it is not the case. Your idea and Mill's idea of working perfectly is different. He designed it so that it will correct clocks which run stably (loess than say 100PPM rate error always). It is NOT designed to hadle clocks whose rates can vary by more than that, or whose time can jump around. chrony (sorry does not run on Windows) does a bit better but again it would have trouble with your clocks as well. I don't know how to improve this by configuration. Depends on what you mean by improved. So I was just wondering if I could get the offset in my software to solve my problem... I think you need to figure out what your problem is first. Regards. Le 27/09/2012 20:39, unruh a ?crit : On 2012-09-27, Benjamin CABUT benjamin.ca...@rsacosmos.com wrote: Hello, We are using Meindberg NTP client and server. Our configuration is: - 1 Computer under windows that is server server 127.127.1.0 Why would you be using a windows machine as your server. Windows is not a great platform for time. And why in the worl would you have it be using the local refclock. That should never be used. Where in the world is that computer getting its time from? broadcast 192.168.2.255 minpoll 4 maxpoll 4 iburst disable auth - several computer under linux + computers under windows, client of this server: server 192.168.2.250 minpoll 4 maxpoll 4 iburst broadcastclient disable auth My problem is the following: Mainly on windows computer, sometime, depending what the computer is doing, there is a big offset between clients and server. (Big for me is more than 500ms). I would like to know if it is possible to setup client so as soon as he
Re: [ntp:questions] PPS and NMEA
Prab, this is a very ambiguous question, so I shall answer it as briefly as the question demands. PPS requires specific hardware and wiring. No PPS does not. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of ksprabha Sent: Monday, 10 September 2012 7:48 AM To: questions@lists.ntp.org Subject: [ntp:questions] PPS and NMEA Hi, Kindly let me know what is the difference between NTP with PPS and NTP with out PPS. Thanks Prab ___ 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] Have Pi, have GPS = low powered NTP server?
Hi Dave, good feedback. I have had the pi running for several days now without a hitch. Due to my dynamic IP (pending a static ip), you can find the pi and associated ntp server at: http://secondthoughts.no-ip.org I made a small realtime time-series plot and a page displaying ntpq info so I can more easily review performance. I fully intend to use serial GPS+PPS when it arrives (slow boat from china), but will continue to build the web site for monitoring the service in the meantime. I am currently building the web page to add additional ref clocks. I do se occasional spikes in the offset. you can see them in the timer series plots which are based on loopstats files. I would hope they disappear when I have pps. I am not sure if this is pi/ethernet or the refclock (which is not close-by). My final use-case is on our internal LAN's at work where we have a GPS unit always on hand, but this is a homework project right now, so the going is a bit slow. I have not seen any lockups yet, and will try to keep it running as long as possible without a reboot. If you have seen it, I am sure it will pop up for me as well. If we get them, the pi is a showstopper for me. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of DaveB Sent: Wednesday, 29 August 2012 4:32 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Have Pi, have GPS = low powered NTP server? In article b0590fa0-d352-4ce0-8504-770846090...@googlegroups.com, pktr...@gmail.com says... Hi, I have my pi running on the web right now at http://121.221.94.250/ I made a small web site to expose various parameters in realtime. Still waiting for my gps unit, but I am pretty happy with millisecond from live internet sources. PPS is next. The website needs a little more polish, but the basics are there. http://121.221.94.250/ Unreachable, 08:19 UTC Wednesday 29th August. I've seen on another site, that people using the chipset based serial port with GPS and other devices, and have *Much* better results than when using a USB hosted serial port. There are still issues with the Pi's network port, as that aparrently is a USB driven device on board, resulting in more latency than might be expected otherwise, and some extra variability too. I also found that the Pi would lock up and need a power cycle, if left running the default NTPD service for anything more than two or three days. It was predictable and repeatable, but I've not tried updating the OS (or NTP) and doing that again. That was using the original Debian distro for the thing. At this exact time, it's back in it's box while I make room for it by doing other things, much more important according to domestic management. I have other plans for it. Regards. Dave B. ___ 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] NTP time compare util
I had a think about this oddball question last night, and decided to explore it a little further. Assuming I understand the original question from Harry Bloomfield, it came to me that the we already have the data Harry is looking for in the peerstats files, ie we have a data record for each response from each configured server... 1.pool.ntp.org Time, offset, jitter, delay Time, offset, jitter, delay Time, offset, jitter, delay an.other.server Time, offset, jitter, delay Time, offset, jitter, delay Time, offset, jitter, delay Harry was looking for a display of this, so I spent a couple of hours and made something which displays the live data... http://secondthoughts.no-ip.org/page-peerstats.php You will see from the plots, I am still fooling round with the conf file, but general principle is to make a utility which can display a 24hour data 'time quality' from several servers at once (Harry asked for the 'time' from several servers, but I interpret that to mean the quality of the time from those servers, as all the humans I know cannot deal with milliseconds) Maybe Harry is really after super-humans (ie the borg), so they are all in collective sync, but this is as good as I can do right now. regards ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] NTP time compare util
Ivan, That tool would be ntpd. Just add all the servers you want to monitor, restart ntp and then run ntpq -p to see them all lined up. You can log the data to peerstats files to a file and make long term plots. Regards - Original Message - From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org questions-bounces+p.kennedy=fugro.com...@lists.ntp.org To: questions@lists.ntp.org questions@lists.ntp.org Sent: Tue Aug 28 18:45:00 2012 Subject: Re: [ntp:questions] NTP time compare util telsar no...@nowhere.com writes: On 8/24/2012 7:52 AM, Harry Bloomfield wrote: [Cross-posting to news:comp.protocols.time.ntp, for obvious reasons.] Out of nothing more that idle curiosity, I am looking a utility which can display the time from several internet time servers at once. I also need to be able to set which time servers it interrogates. Anyone come across such a utility please? ntpdate comes to mind, but it could just be a Unix phenomena. If you search on Network Time Protocol (NTP) you will see much. ntpdate is a suite of client/server programs to do all this stuff. [...] The ntpdate [1] version I use seems to come from the ntp.org package [2], apparently developed by the developers of the NTP protocol itself. Ordinarily, ntpdate(8) is used to set the system's clock to the time obtained by (AIUI) averaging (with weights) the times reported by the servers specified. However, when started as follows, it can show the difference without setting time: $ /usr/sbin/ntpdate -uvq 0.debian.pool.ntp.org 1.debian.pool.ntp.org ... And if the debugging mode is also set (with -d), it shows the individual times reported, too. [1] http://en.wikipedia.org/wiki/Ntpdate [2] http://ntp.org/downloads.html -- FSF associate member #7257 http://sf-day.org/ ___ 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] Visual clock display?
Hi Ralph, NTP is designed to synch your PC clock to UTC. If it is doing its job correctly, your PC clock time == utc time, so any software displaying time will do the trick. If you would like to get hold of NTP's best estimate of time, I would recommend the ntpq qc tool. ntpq -c rv which returns associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync, version=ntpd 4.2.6p5@1.2349-o Jul 06 19:25:05.01 (UTC+08:00) 2012 (3), processor=x86, system=Windows, leap=00, stratum=2, precision=-10, rootdelay=0.140, rootdisp=8.054, refid=172.23.21.9, reftime=d3e55814.b925fac3 Mon, Aug 27 2012 10:21:08.723, clock=d3e55836.1ba456d8 Mon, Aug 27 2012 10:21:42.107, peer=54235, tc=3, mintc=3, offset=-2.315, frequency=0.612, sys_jitter=1.090, clk_jitter=1.770, clk_wander=0.250 Just parse the output from ntpq and you have what you seek. The entry 'clock=' is the one you are after, so my current time is Mon, Aug 27 2012 10:21:42.107. However, there is not a clock on the planet that is perfectly correct (as far as I know), so if you want to be pedantic, you should also parse out the 'offset=xxx' and report this as the estimate of accuracy (in millisecs). hope this helps. -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of Ralph Aichinger Sent: Sunday, 26 August 2012 3:08 AM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Visual clock display? Chris Albertson albertson.ch...@gmail.com wrote: The limit of accuracy of the visual clock is the refresh rate of the monitor. One the old CRT monitors there was a vertical sync that ran at about 60 to 100 Hz. I think LCDs have something like this too. You can do better than 100 mSec using your method. In fact it can approach the vertical sync limit. 100ms is just fine for me, I think. I don't know how much the console driver or a GUI layer adds. The system can do better timing but the 100 Hz (or so) screen refresh is the limit. Actully you eyes can't see a change that is faster than about maybe about 30 mSec. But you CAN see 100 mSec ticks. Run your update loop at 100Hz and you will be fine Is there an official program that displays the time of the ntpd process? Or is one supposed to get time for uses like this from the system clock? Not that I think it makes a difference with 100ms accuracy, but as a matter of principle it would interest me. /ralph ___ 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] NTP and VMware
Hi Ali, when you state ' do not synchronize their times with the server', what do you mean? if you run 'ntpq -p' on the client side, you should see something like this remote refid st t when poll reach delay offset jitter == SHM(3) .XPPS. 0 l-800.0000.000 0.000 SHM(2) .XZDA. 0 l-800.0000.000 0.000 +172.23.21.221 .PPSE. 1 u78 3770.2601.631 0.532 *172.23.21.9 .GPS.1 u88 3770.4431.386 0.448 172.23.21.244 .STEP. 16 u 4d800.0000.000 0.000 TD-GITCENTRAL 172.23.21.9 2 u48 3770.1630.196 1.284 172.23.21.243 .PPSI. 1 u78 3770.1981.976 0.864 The important part here (for now) is the reach to the server. if 377, you have a good connection between the client and the server. Once connection is proven, we can deal with the clock selection process. regards -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of Ali Nikzad Sent: Tuesday, 14 August 2012 12:35 PM To: questions@lists.ntp.org Subject: [ntp:questions] NTP and VMware Hi, I have a cluster which its computers are not connected to Internet. One Linux based and five ESXi based servers which host virtual machines in a vSphere cluster. I need time synchronization between the hosts. Since ESXi supports NTP, I configured the Linux based node to serve as the NTP server and the ESXi nodes as NTP clients. I configured the server's ntp.conf as follows: #192.168.2.10 driftfile /etc/ntp.drift server 127.127.1.0 fudge 127.127.1.0 stratum 10 tos cohort 1 orphan 11 restrict source nomodify restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap and the clients' ntp.conf file: #192.168.2.X driftfile /etc/ntp.drift server 192.168.2.10 tos cohort 1 orphan 11 restrict source nomodify restrict default kod nomodify notrap nopeer restrict 127.0.0.1 The problem is clients do not synchronize their times with the server. What can be the cause of the problem? Thank you, Ali ___ 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] is USB inherently evil, or only if something else is on the bus?
I suspect Dave is on the money here. I commonly see this with RS232 data from a multitude of GNSS receivers. GNSS hardware primary purpose is typically to compute position. We are leveraging off the very handy clock stability feature inherent of GNSS. It is not uncommon for firmware developers to develop code which takes the raw data (clocks, pseudo ranges and any augmentation data available), compute the position, then provide data on the output ports (USB / RS232 / Ethernet). This all sounds very good and reasonable. However, as satellite come and go, your receiver will systematically see a different constellation. This will trigger different computations in the firmware, which may execute faster or slower. Since data (typically NMEA) is output at the very end, the time that data is output is susceptible to the algorithms running beforehand. I can repeat this with ease on a variety of Trimble units. My thoughts would be: *Check the sky visiblity of your GNSS antenna. If you have poor visibility, chances are the computations are struggling, which is delaying the output of the ZDA. This would be my first thought. *Disable any augmentation (eg WAAS) to the device. That often causes different code execution paths. *Disable all NMEA strings other than ZDA *Lift the baud rate to 38400 or 57k. Do not use 115k. I have seen situations where the baud rate was too low for the data being shipped. Nasty. *Have a look at the ZDA string in a terminal program or the debug logs of NTPD. If you are lucky, the timestamps will *not* by integer seconds. They will be the actual timestamp the data was transmitted. If not, speak to your GNSS manufacturer. I have an old Trimble 4000 sitting here with RS232. The ZDA outputs integer seconds in the string. If I enable various options in the firmware, the data is as much as 700 milliseconds old by the time I get hold of it ;-( I think USB is a red herring here. PPS is clearly the best case, but if all you have is RS232 / USB then you need to be more careful. hope this helps. pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of Dave Hart Sent: Friday, 10 August 2012 6:16 AM To: Charles Elliott Cc: Rick Jones; questions@lists.ntp.org Subject: Re: [ntp:questions] is USB inherently evil, or only if something else is on the bus? On Thu, Aug 9, 2012 at 20:29 UTC, Charles Elliott wrote: The process shown in the graph repeats indefinitely using my BU-353W. In other words, the offsets always begin at about 300 ms, rise slowly to about 360 ms, vary erratically between 260 and 360 ms for about two hours, settle at 260 ms, and then rise slowly to 360 ms to repeat forever. It is not clear to me if the problem is the USB interface or the GPS device. Drift of that magnitude must be due to the GPS not USB-triggered latency. Moreover, the real problem is you're assuming the GPS is designed to provide the NMEA sentence(s) at a consistent delay relative to the top of the UTC second. Very often, they are not -- the timing of the NMEA sentences wanders by 100 msec or even more. To get better-than-WAN-NTP performance out of such a GPS, you need to be using its PPS signal. Essentially all USB-interfaced GPSes do not wire the PPS signal through to DCD or another suitable input handshaking line on their serial-to-USB chip. Thanks to Eric Raymond's bufferbloat-related efforts, there is hope we will see PPS exposed on more USB GPSes in the future, however. Cheers, Dave Hart ___ 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] NTP on local networks
Hi Will, good questions. Before I offer an answer: 1. can you please provide samples of the ntp.conf files you have in place. It would really assist. 2. can you please provide the version of ntpd you are using? regards pk Questions: How can I configure a client/peer to always accept a server as good enough or atleast always accept the server when no other server can be contacted? (please answer for any platform below you can) Fedora 6: Fedora 10: Fedora 14: Ubuntu 11.04: Windows XP: How can I configure a server to always consider itself good enough and report that (lie if necessary) so that any badly configured client will still connect?(please answer for any platform below you can) Fedora 6: Fedora 10: Fedora 14: Ubuntu 11.04: Windows XP: Just for my own curiosity, why is just refusing to do what the operator wants the default behavior for clients/peers? Why not always synchronize as well as you can with whichever peers/hosts you can contact? ___ 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] NTP on local networks
Exactly so. you can purchase a GPS receiver for well under $100 connect it to a serial port + pps on any of the pc's and have microsecond accuracy in a few hours. This 'master' can then serve time to all other PC's. The systems will then behave for years of unattended use. It is a far more cost effective solution. regards pk -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of Charles Elliott Sent: Wednesday, 1 August 2012 8:26 AM To: 'Will Shackleford'; questions@lists.ntp.org Subject: Re: [ntp:questions] NTP on local networks Unruh had the correct advice: Buy a (cheap) GPS device for a master clock and propagate the correct time. If something is worth doing, it is worth doing right. Become a force, develop a reputation, for progress, one of the foundations of Western Civilization. The new BU-353, not the old one you can find for about $30, but the one that costs about $42, at USGlobalSat.com will do the job within a half second or better, and it is trivial to set up. All you need is a free USB port and a window, or preferably a thin roof, that faces the satellites. The Sure (search for Sure Electronics) GPS demo board is supposed to give much more accurate time, but it is a pain to set up. There are beaucoup people on this list that know a lot more about GPS clocks than I and most are willing to help, if you just ask. Meinberg at www.meinberg.de sells lots of very accurate clocks, and there are several other places like it. Search for GPS clocks or NTP clocks. Charles Elliott -Original Message- From: questions-bounces+elliott.ch=verizon@lists.ntp.org [mailto:questions-bounces+elliott.ch=verizon@lists.ntp.org] On Behalf Of Will Shackleford Sent: Monday, July 30, 2012 11:47 AM To: questions@lists.ntp.org Subject: [ntp:questions] NTP on local networks We have several computers with several different operating systems on a local network with no radios and no internet connection. The main goal is to keep them synchronized with each other. One frustration I have had is that clients tend to refuse to connect to servers on the network that are not good enough. I assume not good enough means too high a stratum although the error messages are not that clear. My current solution is to take a laptop to another room with an internet connection, let it sit for an hour and then bring it back to connect the local network where finally the other computers will accept it and synchronize with it. Questions: How can I configure a client/peer to always accept a server as good enough or atleast always accept the server when no other server can be contacted? (please answer for any platform below you can) Fedora 6: Fedora 10: Fedora 14: Ubuntu 11.04: Windows XP: How can I configure a server to always consider itself good enough and report that (lie if necessary) so that any badly configured client will still connect?(please answer for any platform below you can) Fedora 6: Fedora 10: Fedora 14: Ubuntu 11.04: Windows XP: Just for my own curiosity, why is just refusing to do what the operator wants the default behavior for clients/peers? Why not always synchronize as well as you can with whichever peers/hosts you can contact? ___ 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 ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] losing time fast
pkmaybe you can post your ntp.conf file, so we can take a look. -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of E-Mail Sent to this address will be added to the BlackLists Sent: Thursday, 12 July 2012 3:42 AM To: questions@lists.ntp.org Subject: Re: [ntp:questions] losing time fast Anonymous wrote: I decided to try to synchronize to my other machines in my network rather than the ntp pool I was using and after restarting the PC with the problem it is fine. I do not know what the problem was since the other boxes are still using the ntp pool and not having any issues so I will revert this PC to its original config to use the ntp pool again and see if it recurs. You don't happen to have the Undisciplined Local Clock Driver 127.127.1.# configured? -- 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] Clock time synchronization of four computers
Nazim, If all you need is relative timing, pick a computer as master (a modern one one you rarely reboot is a good choice), edit the ntp.conf file to use a series (say 3) of external pool servers. then goto the other 3 machines, edit the ntp.conf file and point them at you master, NOT the pool servers. e.g. lets say you have 4 pc's PC1 192.168.1.1 (we will call this the master) PC1 192.168.1.2 PC1 192.168.1.3 PC1 192.168.1.4 PC1 (master on say 192.168.1.1) ntp.conf server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org PC2 (192.168.1.2) ntp.conf server 192.168.1.1 minpoll 4 maxpoll 5 iburst prefer server 192.168.1.3 minpoll 4 maxpoll 5 iburst noselect server 192.168.1.4 minpoll 4 maxpoll 5 iburst noselect PC2 (192.168.1.3) ntp.conf server 192.168.1.1 minpoll 4 maxpoll 5 iburst prefer server 192.168.1.2 minpoll 4 maxpoll 5 iburst noselect server 192.168.1.4 minpoll 4 maxpoll 5 iburst noselect PC2 (192.168.1.4) ntp.conf server 192.168.1.1 minpoll 4 maxpoll 5 iburst prefer server 192.168.1.2 minpoll 4 maxpoll 5 iburst noselect server 192.168.1.3 minpoll 4 maxpoll 5 iburst noselect this will ensure they all synch up. the noselect will assist you with ntpq as you will see all the PC's in the same list and easily assess how well they align. -Original Message- From: questions-bounces+p.kennedy=fugro.com...@lists.ntp.org [mailto:questions-bounces+p.kennedy=fugro.com...@lists.ntp.org] On Behalf Of unruh Sent: Monday, 9 July 2012 12:25 PM To: questions@lists.ntp.org Subject: Re: [ntp:questions] Clock time synchronization of four computers On 2012-07-08, Nazmul Islam nazmul.is...@gmail.com wrote: Hello, I have not used ntp processing before. I apologize in advance if my questions seem too novice. I am trying to synchronize the clocks of four computers. The timing does not have to be accurate but they have to be sync'd with each other. An error tolerance of 10-20 ms is acceptable. The computers are connected to the servers. Well a good way of synchronizing them is to have them all synchronized to UTC. Another is to synchronize one to UTC and the others to it as the server. I installed ntp by typing 'sudo apt-get install ntp' in the terminal. When I typed sudo ntpq -c lpeer, each computer was found to be connected to different timing websites. So what? They are all probably pool servers and synchronized to UTC. But if you want something else, edit /etc/ntp.conf and put in the same server lines. Therefore, I modified the ntp.conf server list and put the following ones for each of them (I am at NJ, USA): server nist1-ny.ustiming.org server nist1-nj.ustiming.org Why would you overload a level 1 server? server ntp.ubuntu.com However, each computer is still off. It's hard to find the exact time difference from eye-balling but I can see a clock time difference of roughly 1-2 second. No idea what that means, but on each of them use ntpq to look at the time offset from utc. You do not tell us what operating system you are using. ssh other.computer date;date will tell you if they are off by seconds. What should I do to synchronize these computers? ___ 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] shared memory driver not working under windows4.2.7p273++ build?
These simply indicate that as you noticed, the Windows port currently does not include the SHM driver. However, the ?code in refclock_shm.c once was portable to Windows, and probably can be made so again without too much effort. You'll need to edit ports\winnt\include\config.h to #define CLOCK_SHM to enable it, then fix any problems compiling the code under Windows. pkIndeed, we did get this up and running a couple of years back with a forked version ntp, but we then abandoned the fork in favour of your ongoing builds. If we sort this out and test it, would you consider merging it into your codebase? We really do not want to fork off permanently, especially with win8 in the offing. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
[ntp:questions] shared memory driver not working under windows 4.2.7p273++ build?
Hello, I have a question on the shared memory driver under windows. I am trying to use the shared mem driver. I believe I am populating the shared memory segment correctly. I have the following entry in the ntp.conf file... server 127.127.28.3 minpoll 3 maxpoll 3 iburst prefer fudge 127.127.28.3 time1 0.0 refid XPPS server 127.127.28.2 minpoll 3 maxpoll 3 iburst prefer fudge 127.127.28.2 time1 0.0 refid XZDA but NTPD.exe in (debug mode) throws the following error... C:\Program Files (x86)\NTP\debugntpd -D2 -c c:\Program Files (x86)\NTP\etc\ntp.conf pk.txt 3 Jul 16:28:16 ntpd[5812]: refclock_newpeer: clock type 28 invalid 3 Jul 16:28:16 ntpd[5812]: refclock_newpeer: clock type 28 invalid i have tried a bunch of ntpd's from davehart.net, but they all throw the same error. It is as if they do not support type 28 clocks under windows. Is this correct? If not, what can be done as a replacement for these drivers, or can they be enabled? kind regards Paul Kennedy ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
[ntp:questions] shared memory driver not working under windows4.2.7p273++ build?
Good morning Sir, I am not sure what this reply indicates. Does it mean the Windows port does not / cannot support shared memory drivers? The comment is a little ambiguous (replaced with what?) CommitLog-4.1.0(5519,45): * ports/winnt/: Replaced with new code (no SHM or PALISADE) ntp-dev-4.2.7p270\ports\winnt\include\config.h(348,19):/* # define CLOCK_SHM */ ntp-dev-4.2.7p285\ports\winnt\include\config.h(349,19):/* # define CLOCK_SHM */ regards pk ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions