Re: [ntp:questions] ntpd behavior with multiple pool definitions

2017-06-15 Thread Hal Murray

> I tried breaking the hosts up into three equal sized blocks (say, pool1,
> pool2, and pool3 for example). and found that if I listed all three pools in
> the ntpd directive. i.e.: 
...

> To my surprise, I got an even distribution of nodes from each of the defined
> pools (X is for anonymity): 
...


> - Is this intended behavior that anyone knows of or did I
> just get lucky (i.e. simultaneous resolving of pools to get balanced
> answers)?

I don't think there is any attempt to balance the usage across multiple 
pools.  It depends on the response from the DNS servers.

If fact, I would expect it to work with 2 pools, one for inside a firewall 
that and another for outside if DNS for the internal pool only worked inside 
the firewall and the firewall blocked access to the external pool DNS or 
external NTP servers.

> - Can I manually expand the count of active peers so that I get
> more than 10? With the pool directives, this gives gives me up to 9 after
> startup, but then it somehow drops down to 7 actual sources after a few
> minutes. 

Why do you need so many servers?

You can adjust the number of clocks the pool command(s) use with tos 
maxclock.  The default is 10.  The count includes slots setup with the 
"server" command and it looks like it is counting the "pool" slot(s) too.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP 4.2.8p10 released

2017-03-23 Thread Hal Murray

Harlan said:
> We're open to doing an even better job of telling folks about things like
> this. 

I think a message should go out to (almost?) all lists when security fixes 
are available to the general public.

The first mail on questions was David Taylor's announcement of the 
availability of Windows binaries.  There was no mention of a security release.

I just checked the archives for announce.  Nothing since April 2015.

The hackers list has only 3 messages in March.  None was an announcement.


If the mailing list traffic has moved to other lists and/or venues, then 
please make an official announcement and disable the old lists.  (but please 
save the archives)


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Monitoring Number of Clients

2017-02-16 Thread Hal Murray

> Third, in my reading of the source code for the Network Time Protocol Daemon
> (NTPD), the program is optimized to handle a high number of requests per
> second, not to record who is making the requests. 

Look at the mrulist.  You can see it from ntpq
  ntpq -c mrulist

The default size is 600 slots.  You will probably want to make it bigger.  
Details in miscopt.html if your setup installed it or html/miscopt.html in 
the source.

With a bit of trial and error, you can figure out how big you need to make it 
to cover the time scale you have in mind and/or how frequently you have to 
grab a copy of the data to keep the table from overflowing.



-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How common is LI=3 - solved.

2017-02-06 Thread Hal Murray

> By the way, the code I am writing is not part of a NTP algorithm to adjust a
> system clock for time.  It is for a one-time frequency calibration of an
> oscillator.  I take a time snapshot at the beginning and at the end of an
> approximately six hour period during which I am counting cycles from the
> oscillator in question.  I hope to achieve a frequency accuracy of 5 PPM.
> Once that measurement is made, I store it for subsequent use in my app.
> Unless the hardware changes, there is no need to do the calibration again. 

Why bother with all the packets.  Isn't your PC's clock good enough?

5 PPM over 6 hours is 0.108 seconds.  Unless you have a crappy network 
connection, ntpd should keep your clock within a few 10s of ms.  If we assume 
25 ms measurement error at both start and stop, you only need 3 hours.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] PPS on Sure GPS units.

2017-02-02 Thread Hal Murray

> The Sure device works, but for me it was too difficult to make the PPS work.
> I bought two and was unable to make either one output a detectable PPS.  The
> PPS was there, my scope told me so, but I could not make the computer detect
> it.  On the other hand, I am very clumsy, and have little experience with 
> electronics.

Are you having troubles with the hardware or the software?

Where did you have the scope on the PPS?

If software, what OS/distro?


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] SHM driver as a PPS source

2016-11-25 Thread Hal Murray

folk...@vanheusden.com said:
> How can I tell NTPd that an SHM time source is actually a PPS and that it
> thus should combine it with some other sources? (an '*' + 'o' combination so
> to say) 

I don't think you can do it the way you have described.

The API for SHM requires that you have already figured out which second 
matches your PPS pulse.

If you have a real PPS pulse, you can connect it to a modem control pin or 
whatever your kernel supports and use the ATOM driver.  Or maybe use gpsd.

If your PPS signal comes in via some strange hardware, you can hack your kernel 
to support the normal PPS API or you can hack the ATOM driver to talk to your 
hardware.

Or you can make your software that is talking to SHM smart enough to provide 
the right second.  Look at the ATOM driver and see how it decides if a time 
stamp is good enough.  You can probably just use the system time and set 
minsane to 3 so it will outvote your clock if the system time is way off.  I'd 
have to do some testing to verify that worked right, but it might solve your 
problem.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Idea to improve ntpd accuracy

2016-02-28 Thread Hal Murray

elliott...@comcast.net said:
> Thank you very much for the paper reference on temperature compensation. The
> paper and its results are excellent.  A self-calibration feature (that
> worked) so that each user could have it configured for his/her own computer
> should not be too hard to implement.  I wonder why NTPD never picked it up? 

You need a temperature sensor mounted right on the crystal.  Most people 
aren't willing to go that far and/or ntpd works well enough without it.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Idea to improve ntpd accuracy

2016-02-27 Thread Hal Murray

> I thought of that too but rejected it as way too machine-specific.  Because
> the clock PLL does not track frequency ramps feed-forward could  be very
> effective (e.g. order of magnitude). To make this work however,  you need to
> first discover which one of many potential temperature  sensors on the MB
> are most closely correlated with frequency, then  measure a rough linear
> gain from temperature to PPM. Seemed too  hardware-instance-specific to me,
> but perhaps there's a way... 

You want to measure the temperature of the crystal.

Several/many years ago, Linux used to use the RTC/TOY clock for the main 
timekeeping.  Now, the main CPU clock is used.  You want to get a temperate 
probe on that.


Mark Martinec has a wonderful web page on that.
NTP temperature compensation
  https://www.ijs.si/time/temp-compensation/


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Best NMEA sentence

2016-02-20 Thread Hal Murray

> Is there a generally accepted NMEA ?best sentence? for use with ntp? For
> example, I?ve seen GPRMC, GPGGA and GPZDA all individually recommended in
> Google searches, variously at 4800 or 9600 baud. Will whatever sentence I
> choose ultimately give the same results?

Do you have a specific brand/model in mind?  (or chip set?)

Simple answer is use GPRMC.  Turn off the others if you can.

GPGGA doesn't include the date.  That might make a difference when booting 
after power loss if your clock battery is dead.  GPZDA doesn't include a valid 
status marker.

The other consideration is that the length of some sentences changes depending 
on how many satellites are visible and working.  If the cluster of sentences 
starts at the same offset each second and the one you pick is after one that 
changes the length, the offset will vary by the length and baud rate.  So pick 
one that is early in the cluster.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] How to monitor NTP clients local time?

2016-02-19 Thread Hal Murray

> But something is not working as I'm expected that. In the rawstats and
> peerstats I can see just the time of the ntp servers from which I'm syncing,
> but I don't see the time of clients who are syncing from me.

> It's very strange, because according to the docs: rawstats : Each NTP packet
> received appends one line to the rawstats file set 

rawstats only logs packets that are responses in the normal request/response 
pair.

There isn't any simple way to do what you want.

You can add a server line for each client you want to monitor.  If you 
include "noselect", it will collect and log all the data and then not use it 
to pollute your local clock.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP Reach is Zero but tally code remain *

2016-02-09 Thread Hal Murray

> * I was accepting that once ntp server (1) will have reach value=0,
> the tally code (*) will be removed, and orphan mode will be available 

How long did you wait?  It might take 5 or 15 minutes to give up on the old 
server.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Making ntpd tweak a TCXO

2016-01-29 Thread Hal Murray

>> I'm assuming your TCXO is driving your A/D.
> Yes.  It spits out samples at a rate f_osc / 24 = 60 Hz.  My ultimate
> task is to timestamp these samples in such a way that there are compressions
> and dilations in the time scale, but no discontinuities. 

60 Hz is pretty slow.  The PPS logic will work at that speed.

Can you feed the A/D trigger signal into something that the kernel PPS 
supports?  You don't actually need the A/D trigger signal, just something 
that is derived from your TCXO.

You are building a PLL.  They have potential stability problems.

-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Making ntpd tweak a TCXO

2016-01-29 Thread Hal Murray

m...@hau.nz said:
> The A/D is a sigma-delta type where you set the output sample rate and it
> runs autonomously (locked to the input clock of course).  "Sample ready" is
> indicated by a falling edge on the SPI MISO line, and I am bitbanging the
> serial interface from the PRU ...

I'd expect some sort of data ready signal but maybe they don't need one if 
you are running it with a clock derived from your main CPU clock.


 > What I am unclear on is how to take that timer snapshot/timestamp, and
> convert it into wall-clock time.  The latter is only available from inside
> the OS (Linux).  I do not understand, practically speaking, how these single
> instants in time are carried across the boundary from the realtime world
> into the nondeterministic world of the OS.  Presumably this is what the
> Linux PPS code does? 

The PPS code just grabs a time stamp on an interrupt.  There is an RFC on the 
API.  It's running on the main CPU rather than a PPU.  It's not cycle 
accurate, just as good as you can get using interrupts.

You can get more accurate results if you have a counter/timer that can 
capture the counter on the edge that makes the interrupt.  I don't know if 
the ARM PPS code does that.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Making ntpd tweak a TCXO

2016-01-28 Thread Hal Murray

> I would like the data stream from my A/D to be long-term accurate.  That is,
> if the sampling rate is 60 Hz, I would like 60*86400*365 +/- 1 samples in a
> [non leap] year.

> To that end, I'd like to discipline the TCXO using ntpd.  I would like it to
> *not* change the virtual clock frequency in software as it usually does, via
> adjtime or whatever hooks are provided by the OS.  Instead, I want the
> frequency corrections to go through my own driver to adjust the hardware
> oscillator directly. 

> Does the NTP software provide any hooks that could be used to accomplish
> this?  I thought of a crude approach, simply writing a program to examine
> the drift file periodically, and using that information to adjust the TCXO.
> But that (a) fails to stop ntpd from adjusting the virtual clock frequency
> within the OS, and (b) isn't really a proper control loop.  I guess it would
> work, sort of, as a last resort.

I don't think servoing out the drift will do what you want.  Suppose your 
TCXO slows down a bit.  After a while, ntpd notices, tweaks the drift, then 
you notice, and adjust it to go the right speed.  But during that time, the 
clock was running a tiny bit slow so you lost a fraction of a cycle.

I'm assuming your TCXO is driving your A/D.

I think what you want to do is monitor the times when your D/A gives you 
data.  Suppose you set things up so that each buffer holds 1 second of data.  
When the buffer fills, grab the time.  Compare that with the expected time.  
...


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] custom NMEA messages

2016-01-04 Thread Hal Murray
>>http://users.megapathdsl.net/~hmurray/ntp/GPS18LVCx-off.gif

> You must have had one of the bad firmware releases: David Taylor's site
> shows the improvement he got after upgrading to better firmware releases, in
> which I believe you were involved with "Kiwi" Geoff on analysis.
> http://www.satsignal.eu/ntp/Garmin-GSP18x-LVC-firmware-issue.htm 

If you look about halfway down that page, there is a table showing the timing 
variations of firmware versions 3.70 and 3.90.  3.90 has a peak-peak of 181 
ms.

That's roughly as bad as whatever firmware I'm running.  So I haven't played 
the new-firmware game.  Anybody know if I can update the firmware from Linux? 
 (or *BSD)


> If you are looking at NMEA message timing - that's all over the board on
> every device, as those serial interface messages get to use only the time
> left after SV tracking and GPS message processing is handled, which may not
> be a lot on the microcontrollers used. Nav GPS receivers with PPS are good
> enough with NTP for most of us who want consistent, correct system time but
> do not need lab quality timing. 

No, some devices do it right.  Look at my graph (way above).  You can do a 
whole lot better than most devices do.

The issue is not the delay.  That can be fudged.  The problem is stability.

If the problem is CPU cycles to compute the answer, a solution is to wait 
until the worst case and then send the message.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] custom NMEA messages

2015-12-29 Thread Hal Murray
> Garmin is a real GPS. please don?t mock me...

The timing on the GPS-18x is also horrible.  The GPS-18 (no x) was good, but 
it wasn't very sensitive.

  http://users.megapathdsl.net/~hmurray/ntp/GPS18LVCx-off.gif


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] custom NMEA messages

2015-12-28 Thread Hal Murray

[SiRF wander.]

> Ugh! I would not have expected that much variation over USB - WiFi does
> better! 

It's not USB.  It's a firmware "feature".


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] set server to a non utc time by hand

2015-12-22 Thread Hal Murray

> i would like to set up an ntp-server thats does not give back the correct
> utc time, but for example  utc-1 or another "wrong" time computed before.
> Until now the only way I reached that result was to  set the local clock to
> the wished time and to sychronize then with 127.127.1.1. 

If you have a local refclock (GPS), you could "fudge" it to have the desired 
offset.

---

This request comes up occasionally.  Has anybody looked into adding the fudge 
offset to internet traffic rather than just refclocks?


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Synchronize distributed PCs with GPS 1 PPS and NTPD for OWD measurements

2015-09-14 Thread Hal Murray

sandip gangakhedkar said:
> Let me clarify that the two nodes *do not* have access to the internet, but
> only to each other, over an unreliable wireless link. So I did not consider
> the option of choosing NTP sync during the measurements. 

What sort of distance accuracy are you expecting?
What sort of distances will you be operating over?

I think your initial message said you wanted time to under 1 millisecond.

The speed of light is 1 foot per nanosecond.  1 ms is a million ns, so your 
error ballpark will be a million feet or 200 miles.  Is that interesting?  
(Did I scramble something?)

How unreliable is your link?


> No, I want to measure the flight times of UDP packets which are sent from
> one node to the other over the direct wireless link. 

I would ignore NTP and do everything yourself.

Do something like ping.  That takes 2 packets, but you don't need to know the 
time on the other end.  If both ends need to know the distance, you can make 
a measurement with 3 packets.

Or you can send a dozen packets and use the minimum time assuming the others 
had delays in the interrupt handler.  (and use the spread in the times as an 
indication of quality)

You will probably need to calibrate the response times of the CPUs and the 
delays through the radios so you can subtract it out.  The radio delays may 
may depend on signal strength which varies with distance, but will also 
change if you go behind mountains or trees or buildings.


Joachim Fabini said:
> - Re-compile your kernel for LinuxPPS support, following the instructions on
> http://linuxpps.org/wiki/index.php/LinuxPPS_installation .

That hasn't been necessary for a long long time.

What version of the kernel are you using?

Recent kernels need something like:
  ldattach 18 /dev/ttyS0
which creates /dev/pps0



-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Nice fanless high-perf NTP server: Fitlet!

2015-01-16 Thread Hal Murray

 Re. the Fitlet: With a 3.9 to 4.5 W power budget this box will never get
 into those ranges, but even handling 1K requests/second with sub-ms  jitter
 and delay would still be a very nice Pool server. 

A Raspberry PI can do 1500 packets per second.

That's a simple measurement with one request in flight at a time.  There are 
lots of reasons that real traffic might go faster or slower.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP Autokey - who is actively using it?

2015-01-15 Thread Hal Murray
Is there a reasonable HOWTO type document describing how to set things up?

Several years ago, Dave announced that one of the machines at UDel was ready 
for testers.  I got as far as discovering that Autokey doesn't work through 
NAT boxes.  Since I'm behind a NAT box, I gave up.

I should be able to help testing by setting up a couple of local machines to 
use Autokey.  So the recipe I'm looking for has to cover both client and 
server in case there are any differences.


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Leap second to be introduced in June

2015-01-13 Thread Hal Murray
[Context is google-smear.]

 For distributed logging you have to use the same method for every single
 node, but that is the case today as well. :-(

 I.e. with one domain smearing and another stepping, the times between  them
 will be skewed over the entire smearing period. 

How often do people working with log files from 2 systems care about 
fractions of a second?


-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] Linux kernel bug in 3:12, low_latency on serial ports is broken

2014-02-22 Thread Hal Murray
Just a heads-up in case you hit this, or want to avoid it.

The symptom is BUG: scheduling while atomic
  https://bugzilla.redhat.com/show_bug.cgi?id=1065087

The discussion at
  https://lkml.org/lkml/2014/2/18/77
confirms that it's the low-latency path that is buggy.

My setup works fine under low load, but hits the BUG when I do something like 
compile the ntp package.

3.11 works fine.  (for me)  There was major work in the serial area for 3.12

I'll send an update when/if it gets fixed.





-- 
These are my opinions.  I hate spam.



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] kernel pps

2012-02-08 Thread Hal Murray
In article jf4tou$7rf$1...@dont-email.me,
 unruh un...@invalid.ca writes:
How do I enable kernel pps? I have kernel 2.6.33-7mdb (Mandriva 2010.1)
which has a pps_core module. But even if I install that module I get no 
/dev/pps0 device not a /sys/class/pps/pps0
Somehow I have to tell it to use look at say the DCD line on the first
serial port. How do I do that?

You need to do something like:
  ldattach 18 /dev/ttyS0

google should find the details.  We should add them to the wiki.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Kernel PPS with Debian

2011-11-03 Thread Hal Murray
In article 95325d10-3ee0-482e-927f-53991e056...@v5g2000vbh.googlegroups.com,
 jimmyterrence jimmyterre...@gmail.com writes:

What do I need to do to get ntp to notice the PPS signal? What am I
missing?

You need to do something like:
  ldattach 18 /dev/gps0

That will create /dev/pps0

Beware: If you have CONFIG_PPS_CLIENT_KTIMER turned on, that
will gobble up /dev/pps0 and the first ldattach will create /dev/pps1

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Trimble Resolution T

2011-10-18 Thread Hal Murray
In article slrnj9ph83.sve.un...@wormhole.physics.ubc.ca,
 unruh un...@physics.ubc.ca writes:
On 2011-10-17, Hal Murray hal-use...@ip-64-139-1-69.sjc.megapath.net wrote:
 In article slrnj9oqdj.3i3.un...@wormhole.physics.ubc.ca,
  unruh un...@physics.ubc.ca writes:

In fact it is really hard for a computer to keep to 1us accuracy because
of the delays in interrupt processing.

 It's not the delay that is the problem.  It's simple to correct for a
 fixed delay.  (at least in theory)  The problem is variations in the delay.

Agreed, if only you had some way of knowing what the delay was. But as
you point out, if you did, it would not really be a problem (just as the
light travel down the cable from the GPS to the computer is not really a
problem since it can be calculated easily and thus fixed. Also, it is
usually much much smaller than the other delays.)

You could patch the interrupt code to flap some bits on the printer
port and put a scope on them.

You could probably write a hack that ran in user mode and flapped
a printer port bit at a specified time.  I'm thinking of something
like wait until x, spin until x+y, read clock, flap bit, read clock.
Then print the two clock times.  You know the bit flapped somewhere
in between them.

With a bit of trial and error you could probably capture a good sample
on a digital scope and read off the difference between the PPS and the
flap.  That would let you compute the clock offset.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Trimble Resolution T

2011-10-17 Thread Hal Murray
In article pine.lnx.4.64.1110161231540.14...@info.physics.ubc.ca,
 Bill Unruh un...@physics.ubc.ca writes:

 fine. Otherwise I have never used trimble proprietary language so have no
 idea what driver to use.

There is a driver that covers the Trimble Palisade and Thunderbolt.

If you are lucky, it will work with the Resolution.  If not, it is
probably reasonable to add support for it.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Trimble Resolution T

2011-10-17 Thread Hal Murray
In article slrnj9oqdj.3i3.un...@wormhole.physics.ubc.ca,
 unruh un...@physics.ubc.ca writes:

In fact it is really hard for a computer to keep to 1us accuracy because
of the delays in interrupt processing.

It's not the delay that is the problem.  It's simple to correct for a
fixed delay.  (at least in theory)  The problem is variations in the delay.

Jitter can easily be caused by cache faults or jitter in finishting the
processing of the current instruction, or having interrupts disabled.
(There are probably other sources.)


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Loop Frequency and Offset

2011-09-26 Thread Hal Murray
In article j5q79m$2u8$1...@dont-email.me,
 David Woolley david@ex.djwhome.demon.invalid writes:
Miguel Gon=E7alves wrote:

 What is a typical offset of the loop without using special oscillators?
 Is less than 1 us achievable?

Depends on the network or reference clock, and the resolution to which
the local clock can be read.

It also depends upon the stability of the local oscillator.

Inexpensive oscillators (as used in PCs or most servers) are
quite temperature sensitive.  The temperature in your box will
probably change as the load on the system changes or the room
temperature changes.

In fact, you can use a PC running ntpd as a thermometer.

This is good work and a fun read:
  NTP temperature compensation
  Mark Martinec, 2001-01-08 
  http://www.ijs.si/time/temp-compensation/


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Single GPS/PPS time source gets marked as a falseticker

2011-07-14 Thread Hal Murray

$GPZDA ?

I tried it on one unit.  It didn't help.  If anybody has examples of
it working please let us know what type of GPS receiver you tested.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How do I prevent sudden system time jumps.

2011-07-13 Thread Hal Murray
The problem is that the adjustment takes to large steps, not that it
takes to long time.

ntpd will slew the clock at 500 PPM.  You may be willing to wait a while
for a second or two, but it takes a long time if you have to adjust
by several minutes or an hour.  That may be OK for your setup, but you
should think about it.

If you are using the -x flag, be sure to check out the -g flag that will
let it do one long jump at startup time.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How do I prevent sudden system time jumps.

2011-07-13 Thread Hal Murray

The following is an example from ntpd.log

14 Apr 07:22:25 ntpd[1048]: synchronized to 10.0.0.5, stratum 1
14 Apr 07:22:25 ntpd[1048]: time reset +0.231004 s
14 Apr 07:23:35 ntpd[1048]: synchronized to 10.0.0.5, stratum 1
14 Apr 07:39:33 ntpd[1048]: time reset +0.318457 s
14 Apr 07:39:33 ntpd[1048]: kernel time sync disabled 0041

Is the clock at 10.0.0.5 good?

If all your adjustments are in the same direction, then your system
is probably broken.  If they alternate signs, then something in your
network or remote clocks is probably confused.

One thing to try.  What's in your drift file?  (It's probably in
/var/lib/ntp/drift or /etc/ntp/drift ...)  If that it a big number
like 500, try stopping ntpd, deleting that file, and restarting ntpd.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Network problems affecting NTP

2011-07-02 Thread Hal Murray
In article 51c20190-11b8-4629-a762-cbf95369e...@r18g2000vbs.googlegroups.com,
 Eugen COCA ec...@eed.usv.ro writes:
Due to a network problem on our provider, the packets were routed on a
different path than usual yesterday, for several hours. This period,
NTP displayed wrong offsets:

ntpd assumes the network path is symmetric.  If it's not, the time
will appear to have an offset.

You can turn things around.  If you know the time at both sites,
you can measure the network delays.

If you turn on rawstats, ntpd will write a line to a log file for
each packet exchange.  (details in the html files)  You can graph
the offset and delays.  If you have a good connection, it's easy
to spot network topology changes.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Garmin firmware update - GPS 18x 5Hz software version 3.20

2011-06-17 Thread Hal Murray
In article banlktikc4ydiycbw4no2ay2o-r+dfp9...@mail.gmail.com,
 steven Sommars stevesommars...@gmail.com writes:
You may want to watch for several days.   Previous 18x LVC firmware (3.60)
drifted on my system from 0.5 to 1.4 seconds over a span of 6 days.   I've
been running a beta version of 3.70 for several weeks with no problems.

How stable is it?

I don't care what the offset is as long as it's constant.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Ntp not syncing after powerfail of server

2011-05-19 Thread Hal Murray
In article 35fcd513-e8ea-4feb-a33b-6d47d6556...@mac.com,
 Chuck Swiger cswi...@mac.com writes:
On May 19, 2011, at 10:01 AM, M. Giertzsch wrote:
 To run into the problem that the client is not syncing to the server I
 -- stopped the NTP service on both client and server
 -- changed the time on the client back to january of 1975
 -- started the NTP service on the client
 -- started the NTP service on the server a little later

By default, ntpd will not try to correct a clock which is insanely far off.
 The -g flag can be used to change this; otherwise run ntpdate -b at boot
 to get the clock close and then run ntpd afterwards to keep the clock in sync.

Running ntpdate at boot time won't work if the server isn't ready yet.

I think the -g switch to ntpd will do the right thing, that is allow
one big jump the first time it sets the clock.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Windows time question.

2011-04-26 Thread Hal Murray
[default pool command uses 10 servers]

I agree. It is absurd. It seems to indicate that the ntp folk really
really do not trust the pool, and figure that if you get fewer than 10, you 
have a
reasonable chance that a majority will deliver bad time. Ie, they appear
to feel that the pool is a pretty useless souce of time. 

I don't think it's a matter of not-trust.  I think it's just using
some old code/parameters because the pool code hasn't been working
long enough for things like that to get fixed or documented.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Using two NTP Server: Bad?

2011-04-25 Thread Hal Murray
In article slrnir4ti8.j3t.un...@wormhole.physics.ubc.ca,
 unruh un...@wormhole.physics.ubc.ca writes:
On 2011-04-23, Hal Murray hal-use...@ip-64-139-1-69.sjc.megapath.net wrote:

 All it takes is a firmware bug and to have several NTP servers
 using the same GPS device with the bug.

What good will having more servers do then? If the probablility of 4 bad
ones is that high, the probability of 5 out of 9 is also high, and 6 out
of 11. Ie, in that case you are basically screwed. Of course everyone
could just use the national time standards servers-- they are not liable
to be wrong (maybe just overloaded).

All I was trying to do is point out that the discussion of how many
servers to use gets (much) more complicated if you consider what happens
if some of them get the wrong time due to a software bug that is likely
to hit all the servers running that software/firmware.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Using two NTP Server: Bad?

2011-04-23 Thread Hal Murray
 Consider that failure here encompasses serves bogus time.  Suppose
 you have 7 sources configured and 4 of them cluster nicely around an
 incorrect time, with 3 clustered around UTC.

I suppose it's possible but I'm not going to hold my breath waiting for 
an instance to appear!

All it takes is a firmware bug and to have several NTP servers
using the same GPS device with the bug.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Windows time question.

2011-04-21 Thread Hal Murray
I would have hoped that the pool folk kept their documentation up-to-date, 
so I'll post that on their list.  You didn't mention how to control the 
number of servers uses - is it just multiple pool entries?

You only need one pool command.
  pool server-name
will use as many addresses from server-name as it needs.
If it doesn't get enough with the first DNS lookup, it will try
again in a minute or so, and keep trying until it gets enough.

The default is to collect 10 servers.
If you don't like that, you need to add something like:
  tos maxclock 5


Using more than one pool command might be interesting if
the names are in different administrative domains.  If one is broken,
the other might work.

If you use more than one pool command, ntpd takes the answers
from whichever DNS server answers first.

I think it will drop servers that don't work and get new ones
to replace them.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntpq 4.2.7p153 only shows 5 peers

2011-04-17 Thread Hal Murray
In article iof9dn$alt$1...@speranza.aioe.org,
 Edward T. Mischanko etm1...@hotmail.com writes:
ntpq 4.2.7p153 only shows 5 peers when many more are configured?

server 127.127.20.0 minpoll 3 maxpoll 3 prefer
fudge 127.127.20.0 time2 0.800 refid PPS flag1 1 flag3 1
server tick.cerias.purdue.edu burst
server tock.cerias.purdue.edu burst

It's a bug/feature that was introduced a while ago when
the DNS stuff was cleaned up.

I forget the term, but servers that get added via DNS don't show
up to ntpq until they get enough responses.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] new driver development

2011-04-09 Thread Hal Murray
In article hiUjp.6071$yl2.1...@newsfe07.iad,
 Bruce Lilly bruce.li...@gmail.com writes:

Mutexes can work across processes; look for pthread_mutexattr_setpshared.

Thanks.

The first party who needs the mutex (if not already initialized)
initializes it.  Destruction is another issue.

How do I decide who is first?

There are a lot of complications (e.g. the mutex (and its attributes)
typically are mapped to different addresses in different processes).

What happens to a mutex in shared memory if all the processes using
that memory go away?  Does that shared memory stay around, or would
the mutex have to be reinitialized if one of the programs using it
gets restarted?

Is there any way to test to see if a mutex has been initialized?


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] new driver development

2011-04-09 Thread Hal Murray
In article 4da0c50f.3050...@comcast.net,
 Richard B. Gilbert rgilber...@comcast.net writes:
On 4/9/2011 12:55 PM, Hal Murray wrote:

 Is there any way to test to see if a mutex has been initialized?

You initialize your mutex BEFORE it is needed.

Right.  But consider the case of ntpd and gpsd.

Who initializes it?  Even if you say You must start X before Y
(which looks pretty ugly to me) you need something to cover the
case where you start X, it initializes the mutex, you start Y,
and now you want to restart X.  This time, it can't initialize
the mutex because Y may be using it.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Help getting IRIG working

2011-04-03 Thread Hal Murray
 The clock puts out all of its signals on BNC.  I'm not clear on the
 nomral assumptions with such wiring; for example, does one normally
 connect everything with BNC-T's, with the first and last T terminated
 with a 50ohm resister, or should I just connect direct through?

It's audio you don't need any terminations to avoid reflections.
(Well maybe if you have a few spools of coax in your setup.)


This is where its perhaps most problematic for me...how do I know
what's wrong with the input?  How do I know what the input is supposed
to do?  It seems, for example, level adjustment is just guess-and-test
with no way to know if I'm making it better or worse..how should one
normally do this?

The driver adjusts the gain.  That value shows up in clockstats.
Find it and watch it as you experiment.  It should go to 255 when
you disconnect the signal.

As Dave Mills said, you will probably need an external attenuator to
reduce the volume to a reasonable range.  I used clip leads and resistors
until I found something that worked.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Secure NTP

2011-03-25 Thread Hal Murray
In article slrnionrs2.teh.koste...@stasis.kostecke.net,
 Steve Kostecke koste...@ntp.org writes:
On 2011-03-24, Hal Murray hal-use...@ip-64-139-1-69.sjc.megapath.net wrote:

 Yes.  The encryption also verifies that you are talking to the
 server you think you are talking to rather than an imposter.

NTP Authentication adds signatures to the packets. There is no
encryption.

Thanks for the correction.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Secure NTP

2011-03-24 Thread Hal Murray
In article ghps58-1a@mail.specsol.com,
 j...@specsol.spam.sux.com writes:

When I see questions like this my first response is Why all the bother?.

There is nothing secret or proprietary about the time of day.

Since all NTP servers provide UTC, the service reveals nothing about the
machine other than the fact that the clock is correct.

If you don't want your resources utilized by outsiders, you just block
access to the NTP port for everyone but your own clients as a blocked
port uses less resources than denying an unsucessful authorization does.

Am I missing something??

Yes.  The encryption also verifies that you are talking to the
server you think you are talking to rather than an imposter.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntpd -q and driftfile

2011-03-23 Thread Hal Murray

 oh, come off it. Your reaction time is nowhere near what ntp -q would
 give you. Using ntp -q run once every hour, and assuming say a 20PPM
 drift for the crystal, his clock would be out by less than a 100 ms due to 
 the
 drifting, and your reaction time with your watch ( and wyour watch) are
 nowhere near that accurate. 

Actually, it is on the borderline of the achievable.  You phase lock 
your finger bounces to the second ticks and just go that little further 
on the exact time.  It's certainly good to 200ms and possibly good to 100ms.

That would be a fun project for a science fair.
  Build a setup.  Collect a lot of data.
  How much does it vary?  For one person, between people, ...
  How close can you get if you are trying to set a clock?
Can you calibrate the person and subtract off a constant?
What if you get multiple samples?

Many years ago, my boss did that sort of stuff.  I think he said that
normal reaction time from light-on to button-press  was 250 ms.  It's
faster if there is no penalties for false presses.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntpd -q and driftfile

2011-03-23 Thread Hal Murray

You can probably do better than that. That is for the reaction to
something that you do not expect. Ie, you have decide that the event has
occured and then send the messages to your finger to press. However for
the timing, you know exactly when it is going to occur. You can get
yourself into a rhythm on each second, and then finally press the
button. So I suspect you can do about .1 sec if you try hard. 

That would be another good science fair type experiment.

How long does it take to respond to a predictible event vs
to an unpredictable stimulus.  What is the distribution?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] new driver development

2011-03-19 Thread Hal Murray
In article 2wlgp.34776$d46.31...@newsfe07.iad,
 Bruce Lilly bruce.li...@gmail.com writes:

 o POSIX mutex for synchronized access to shared memory for updates
   -- obviates mode 0 / mode 1 / OLDWAY

I'm far from a POSIX wizard.  When I google for POSIX mutex I get
a bunch of hits that all are part of pthreads.

Does that stuff work across processes rather than threads?

The mutex needs to be in shared memory so both processes can get at it.
Right?  Who initializes it?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Large offset and lots of time resets

2011-02-23 Thread Hal Murray
In article Xns9E95DA199C4695r68mtnbtdvsdr@194.109.133.242,
 Maarten Deen zq...@kf4nyy.ay writes:
...
23 Feb 20:42:53 ntpd[27664]: time reset +2.421296 s
23 Feb 20:52:05 ntpd[27664]: synchronized to 217.67.231.25, stratum 2
23 Feb 20:58:31 ntpd[27664]: time reset +2.356457 s
23 Feb 21:04:48 ntpd[27664]: synchronized to 217.67.231.25, stratum 2
23 Feb 21:14:26 ntpd[27664]: time reset +2.400477 s

This goes on and on and on. And regularly ntp stops having connection, 
reach goes to 1 and builds up again. Never that it is a poll that's been 
missed, it is always back to 1 as if ntpd has started itself up again.

I'm using ntp 4.2.4p4 on a Ubuntu box. Linux kernel 2.6.24.

What's wrong in this setup?

My guess is that the clock on your system is broken.  Are you
using some sort of power saving that is changing the CPU frequency?

Have you tried a different clocksource?
  (google for linux clocksource)


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Getting PPS to work with Oncore ref clock

2011-02-17 Thread Hal Murray
In article ia4v28-a6c@p4x2400c.home.lordynet.org,
 David Lord sn...@lordynet.org writes:

or even a LED + diode + resistor will be enough to show if there is
a pulse. Radioclkd2 can be used in debug mode to confirm the single
DCD pulse and width.

Some devices put out a narrow (10 microsecond) pulse.  I don't know
what the Oncore does.

I have one PC that works fine with a narrow pulse and another PC
that doesn't see it.  I kludged together a pulse stretcher (diode, R, C)
and it started working.  Well, I thought it was working.  It turns out
that it only sees some of the pulses.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-17 Thread Hal Murray
In article slrnilckj1.3pd.nom...@xs8.xs4all.nl,
 Rob nom...@example.com writes:
Hal Murray hal-use...@ip-64-139-1-69.sjc.megapath.net wrote:

It would be good if someone (or someones) has actually been collecting
rawstats for a long period, to serve as a baseline. Bufferbloat is a
relatively new phenomenon. 

 I'll bet it's been there for a long time.  (meaning at least several
 years)

 I see delays up to 3 seconds, but only when I'm downloading a big
 file.  I assume it's all queued up at the other end of my DSL link,
 but I can't prove that.

When downloading a single big file causes you 3 second delays, you simply
have set an insanely large TCP window.

I didn't tweak anything.

It's possible that my 3 second delay was while using Firefox rather
than a simple download.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-17 Thread Hal Murray
In article ijhd7d$au6$1...@news.eternal-september.org,
 E-Mail Sent to this address will be added to the BlackLists 
Null@BlackList.Anitech-Systems.invalid writes:

 As far as I can tell the products have all the knobs
   they need to be properly configured to deal with the issue.

  The ISPs / NOC staff / IT departments / ... just aren't
   taking the time, to properly / fully configure the products,
   rather than just the minimal configuration necessary to make it work.

The defaults have to work reasonably well.  The support staff doesn't have
enough time to help each user setup their system correctly.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Getting PPS to work with Oncore ref clock

2011-02-17 Thread Hal Murray
In article aanlktimlss1bjtrde77av92-wwfyr_g7ovm7zd0yr...@mail.gmail.com,
 Chris Albertson albertson.ch...@gmail.com writes:

(It's a 75 foot serial cable.)   I suspect a software configuration
problem or maybe polarity.

If the polarity is wrong, you will just use the other edge.  It will be
off in timing by the pulse width.  It will appear to work, just get the
wrong answer.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-11 Thread Hal Murray
In article 87lj1q823k@cruithne.co.teklibre.org,
 d...@taht.net (Dave =?utf-8?Q?T=C3=A4ht?=) writes:

Presently! It sounds like a lightly modified ntp server - or set thereof
- could actually attempt to keep track of this information.

I don't think ntpd needs any modifications.


Do ntp clients use an ephemeral udp src address for a query? 

The server listens on port 123 and sends the answers back to
the source port they came from.

ntpd is both a client and server.  It sends from port 123.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-11 Thread Hal Murray

It would be good if someone (or someones) has actually been collecting
rawstats for a long period, to serve as a baseline. Bufferbloat is a
relatively new phenomenon. 

I'll bet it's been there for a long time.  (meaning at least several
years)

I see delays up to 3 seconds, but only when I'm downloading a big
file.  I assume it's all queued up at the other end of my DSL link,
but I can't prove that.


 ntp tries to filter out the packets with long (queueing) delays
 so you will see the bad stuff in rawstats that you won't see
 in peerstats or ntpq -peers

I was afraid of that. What qualifies as a long queueing delay?

Normally, ntpd uses the lowest delay of the last 8 packets.

There is a huffpuff filter.  (details in miscopt.html)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-09 Thread Hal Murray
In article iithjg$83s$1...@news.eternal-september.org,
 David Woolley david@ex.djwhome.demon.invalid writes:
Dave T=E4ht wrote:

A well managed router would prioritised NTP traffic and isolate it from=20
the buffering, which should only really affect bulk TCP traffic.

How many routers to that?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Detecting bufferbloat via ntp?

2011-02-08 Thread Hal Murray
In article 87aai6d0t6@cruithne.co.teklibre.org,
 d...@taht.net (Dave =?utf-8?Q?T=C3=A4ht?=) writes:

I've been racking my brain trying to come up with a good way of
semi-passively detecting bufferbloat at the datacenter. 

What would wild swings in latency on the order of seconds from a ntp
client register on a ntp server as?

Are you trying to detect it in real time, or collect long term
data?

Turn on rawstats.  (info in monopt.html)  That will log 4 time
stamps for each ntp packet received.  If the time on both systems
is accurate, that will give you a pair of one-way times.

ntp tries to filter out the packets with long (queueing) delays
so you will see the bad stuff in rawstats that you won't see
in peerstats or ntpq -peers

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Odd results with Oncore UT+ ref clock

2011-02-02 Thread Hal Murray
In article AANLkTi=ju-fv8e-q4rh3p7rpdf3cqncn7dpec9zrc...@mail.gmail.com,
 Chris Albertson albertson.ch...@gmail.com writes:

What I'm looking for here is advice on what to check.

Is there anything interesting in the ntp log file?
(defaults to syslog which is usually /var/log/messages)

Is there anything interesting in clockstats?
Do you have clockstats enabled?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Peridoc anomalies in loopstats file ...

2011-01-26 Thread Hal Murray
In article g7do08-bma@gateway.py.meinberg.de,
 Heiko Gerstung heiko.removethistext.gerst...@meinberg.de writes:

 Mmmh, the polling cycle I use is 8s (patched ntpd), and if you look
 at this sample sequence ...:

Does the problem happen without that patch?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] GPX18x LVC 3.50 firmware - high serial delay problem workround

2011-01-14 Thread Hal Murray
In article AANLkTi=E0_9LzCDg9esXx7yZp_NJGmSU+cuS=FY9=8...@mail.gmail.com,
 Chris Albertson albertson.ch...@gmail.com writes:

Could this be automated?  Maybe, to some degree.  The reference clock
driver would need to have a survey mode setting where it would run
for many hours and compare it's own time to others.  NTP does this
already, almost,  what it lacks is a way to capture the measured
offset and fold it back to a config file.

If you run the to-be-calibrated server in noselect mode, it
won't pollute your local clock.

If you turn on peerstats, you can get lots of data about how far
off that clock is.  That assumes your local clock is correct.

If you believe that the PPS is correct, you only have to get
the NMEA text close-enough.  You can easily get there using typical
network connections.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How to keep Linux server in Chicago and Mumbai in sync to within 5 microseconds

2011-01-12 Thread Hal Murray

In article 20110112162440.ab9f81c...@ptavv.es.net,
 Kevin Oberman ober...@es.net writes:

GPS satellites broadcast time in TAI, not UTC. Currently the offset
between TAI and UTC is 15 seconds.

Actually, they broadcast GPS time which is offset from TAI by
the number of leap seconds that had already happened when they
started using GPS time.

They also include the offset from GPS time to UTC so you can get
UTC from GPS satellites.  (They also include leap second warnings
so you can do the right thing when leap seconds happen.)


From
  http://tycho.usno.navy.mil/leapsec.html
As of 1 January 2006,
TAI is ahead of UTC   by 33 seconds.
TAI is ahead of GPS   by 19 seconds.
GPS is ahead of UTC   by 14 seconds.

We've had one more leap second since 2006, so that would be 34 and 15.

http://maia.usno.navy.mil/ser7/tai-utc.dat
 1999 JAN  1 =JD 2451179.5  TAI-UTC=  32.0   S + (MJD - 41317.) X 0.0  S
 2006 JAN  1 =JD 2453736.5  TAI-UTC=  33.0   S + (MJD - 41317.) X 0.0  S
 2009 JAN  1 =JD 2454832.5  TAI-UTC=  34.0   S + (MJD - 41317.) X 0.0  S

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How to keep Linux server in Chicago and Mumbai in sync to within 5 microseconds

2011-01-12 Thread Hal Murray
In article aanlktincze9exucs_6ioz3geoexmzt3etoj7bpl6b...@mail.gmail.com,
 Chris Albertson albertson.ch...@gmail.com writes:
On Wed, Jan 12, 2011 at 11:25 AM, unruh un...@wormhole.physics.ubc.ca wrote:

 ... There is nothing in CDMA that would require very
 accurate absolute time I presume. Thus there is no real reason why they
 should deliver absolute time with high precision. ...

Tower triangulation based on time of flight delay is used to determine
location of a cell phone.  There is a requirement to attach location
to 911 calls and triangulation is a kind of last resort method for non
gps enabled phones.

It's not a last-resort.  It's an ecnomoic decision.  Do you
replace all the cell phones with new ones that have GPS chips
or do you upgrade all your towers with gear to do the triangulation?

Note that being able to do triangulation doesn't require that
the time at the towers be accurate, just that they be in sync.
Triangulation would all work if all the clocks were off by
1.37 seconds.  (as long as they all used the same value of 1.37)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Problem with Trimble Placer 450 - gpsd - ntpd

2011-01-04 Thread Hal Murray
In article 201101011238.p01ccalc009...@heartache.daihls.com,
 Bruce Dale bd...@stny.rr.com writes:
...

Do you have contacts at gpsd with which you work out problems? If 
not, I would be glad to provide the email addresses of the people who 
were helping me. I can provide info about the problem, my solution, 
and a test bed for a fix.

There haven't been enough interesting problems to worry about it.

The SHM api is pretty simple.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] What version of ntpd am I really running??

2011-01-04 Thread Hal Murray
In article ig0ajc$sp...@speranza.aioe.org,
 Edward T. Mischanko etm1...@hotmail.com writes:

What is the prper way to determine the current version of ntpd that you have 
installed or are running? 

One way to find out what you are (or were) running is to scan
/var/log/messages or wherever your syslog goes.

There should be something like this:
Jan  4 10:53:39 shuksan ntpd[24383]: ntpd 4.2.7p...@1.2416-o Tue Jan  4 
18:52:49 UTC 2011 (1)
(The date on the end is when the system was compiled.)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Problem with Trimble Placer 450 - gpsd - ntpd

2010-12-30 Thread Hal Murray
In article 201012291506.obtf6xa5021...@heartache.daihls.com,
 Bruce Dale bd...@stny.rr.com writes:
...

I have a Trimble Placer 450 GPS receiver generating a PPS signal and 
NMEA sentences to gpsd (2.95), which passes that information to ntpd 
(4.2.6p2) over the shared memory interface (reference clock driver type 28).

When the Placer 450 has a consistent 3D fix on several satellites, 
ntpd selects SHM(1), the PPS signal, as the syspeer. No problem.

The problems occur when the Placer 450 loses satellite fix. In my 
environment, this happens multiple times a day.
...

The time server is a system consisting of the Trimble GPS receiver, 
gpsd and ntpd. The gpsd folks are happy to implement a fix to the 
problems with the Placer 450, but how are problems between gpsd and 
ntpd resolved? Specifically, how should a GPS receiver report a loss 
of satellite fix to ntpd over the shared memory interface? Should 
ntpd ignore the PPS during the interval of no fix? And what is the 
correct behavior of ntpd when this happens?

If the NMEA signal says no-good, gpsd should ignore the PPS pulses.
It should probably wait for several seconds of good NMEA messages
before turning on PPS.

There isn't any way for gpsd to say clock-died via the SHM interface.
All it can say is here-is-data.  ntpd should timeout if gpsd stops
feeding it data.  It may take 2 minutes.  If that's not good enough
we can look into tweaking the SHM interface.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] signal_no_reset: signal 18 had flags 20000

2010-12-14 Thread Hal Murray
In article 67578d3d-adff-469a-a57b-a9ff54460...@39g2000yqa.googlegroups.com,
 bombjack bombjac...@gmail.com writes:
I have STFI like crazy, but can't find an explanation for the error
code signal_no_reset: signal 18 had flags 2 Could someone
explain what this mean? Or even better, give me a hint where I can
find info about all these error codes etc for ntp

Most ntpd error/syslog messages come from a call to msyslog which
has printf type arguments.

If you have the sources handy, you can grep for part of the text
from the error message.  In this case,
  grep signal_no_reset: signal . -r
gets one hit in ./libntp/syssignal.c

Note that it helps to have the sources that correspond to the code
you are running.  You can get that either by tracking down the sources
for the code you are running, or grabbing a known source and rebuilding
and installing.
  http://support.ntp.org/bin/view/Main/SoftwareDownloads

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntp# pid 1012 (ntpd), uid 0: exited on signal 11

2010-12-09 Thread Hal Murray
In article idpmi8$ll...@speranza.aioe.org,
 Edward T. Mischanko etm1...@hotmail.com writes:
ntpd not working on a Soekris NET4501 with a nanoBSD install.  Any ideas 
where to start?  ntpdate is working OK. 

signal 11 is segmentation fault (illegal address) so something
is really screwed up.

Lots of people run ntpd on NET4501s so it's probably something simple.

What version of ntpd are you running?  Was it compiled for your OS?

Have you looked in /var/log/messages and such?


There is a -d switch to ntpd.
  http://www.eecis.udel.edu/~mills/ntp/html/ntpd.html

I think it disables switching to daemon mode so the debugging
printout goes to your terminal.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Question on ntpd -g -q option and Step Threshold

2010-11-18 Thread Hal Murray
In article 0a89d263-0355-4dee-8c9c-b4912076d...@w38g2000pri.googlegroups.com,
 SteveW qsw...@email.mot.com writes:
I wanted to confirm that my understanding of the step threshold and
how it applies to ntpd used with -g -q options (similar to ntpdate) is
correct.

With the default step threshold of 128 ms, if a machine's time is
within 128 ms of the ntp server's time, when it syncs with the server,
will it exit from ntpd -g -q without stepping the clock?

This appears to be the behavior I am seeing.  I tried setting the
clock on my machine off by 110 msec from the ntp server and it didn't
step the clock.  When I set it off by 220 msec it did step it.

There are two ways to adjust the time.  One is to step it by just
smashing the desired time into the clock register.

The other is to slew it by slightly adjusting the rate the local clock
ticks until it has gained/lost the right amount of time.

ntpd normally steps for changes over 128 ms and slews for changes under.

In your 110 ms test, I expect it to slew the clock rather than step it.
It may exit before the slew has finished.  You can check by waiting
a few minutes and then running it again.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] -8.625 ms offset between ref clock (NMEA PPS) and nearest stratum 1 peer

2010-11-15 Thread Hal Murray
In article ibm99p$ls...@speranza.aioe.org,
 Edward T. Mischanko etm1...@hotmail.com writes:
I am running a Garmin 18x LVC with PPS enabled; it is very stable and I 
beleave it to be accurate.  My nearest back-up server is consistantly 
around -8.625ms away.  This is so much that other clients on my network see 
me as a false ticker even with a prefer setting.  I am on a farly fast ADSL 
connection to the internet, but of course, it is non-symetrical.  Other 
users I have conversed with don't seem to have this wide of an offset, so 
something is wrong somewhere.  Yes, I can fudge the offset away on the ref 
clock, but it doesn't seem right to tell a ref clock to lie about what time 
it is just to keep
everyone else happy?

Have you tried a few other servers on the internet?

How far away is that server?  It's not crazy to be off that
far due to asymmetrical routing on the internet.  (That's
even if you don't have an A in your ADSL connection.)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] help needed for ntpd ipv6 setup

2010-11-10 Thread Hal Murray
In article ibdgsl$40...@news.eternal-september.org,
 David Woolley da...@ex.djwhome.demon.invalid writes:
joan lee wrote:
 
 Wireshark runs on PC1 shows NTP client messages from 2002::c0a9:0102
+ are received properly, but instead of replying with NTP server messages,
+ PC1 is sending ICMPV6 unreachable (administratively prohibited) messages.

 Could anybody gives me some hint on why NTPD ignores the IPv6 NTP
+ client messages?

Administratively prohibited doesn't sound like a condition than an 
application program can generate.  I would look at your firewall.

First, I'd check the simpler solution of does the version of ntpd he
is running support IPv6.  What does netstat -ul say?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Local clock - sync issue

2010-11-04 Thread Hal Murray
 I've found that bad things happen at much above 50ppm.

I have lots of systems that work fine at well over 50 ppm.

With a good PPS, the drift will track temperature and you
can use the system as a thermometer.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Test ntpd performance

2010-09-28 Thread Hal Murray

The most I've seen a single netperf *single-byte* burst-mode test do
is on the order of 350K transactions per second, and that is when
netperf is bound to a core other than the one taking interrupts from
the NIC to get some additional parallelism.  In a netperf TCP_RR test,
netperf does virutally nothing but a send()/recv() pair and a couple
conditionals and adds.

Is that sending 1 byte of data per packet, or batching up
several/many bytes per packet?  (and mostly measuring
the CPU time for a one byte send/recv pair)


Even if you have a test program that blasts lots of packets,
that won't mimmic real traffic.  It's bypassing all the setup
of ARP and router slots.

The only really useful data I've seen is the numbers from the
people running heavily loaded servers.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Linux clocksource

2010-08-25 Thread Hal Murray
[Linux TSC calibration troubles.]

YOu do not say which kernel you are using. I believe that the problem
with tsc has been fixed in later kernel versions. 

Does anybody know which version it was fixed in?


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Decommission NTP server

2010-08-25 Thread Hal Murray
In article qgofk7-dsb2@ntp.tmsw.no,
 Terje Mathisen terje.mathisen at tmsw.no writes:
John Kennedy wrote:
 We have an NTP server that we want to decommission. Before we do this we
 need to know which servers are using this server to their time. Is there a
 way to log which servers are syncing off of this server?
 I have looked at the logconfig directive and can not find enough info on it.
 I have tried logconfig=all but that does not help.

'ntpdc -c monlist' is your friend, it will list the last 600-700 clients.

If you have a lot more clients than this, then you'll have to either 
install a new/dev ntpd version or insert WireShark or a similar sniffer 
on a mirror of the server switch port.

Or fix the clients you can see, then check again to see who is still
using the server.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Maximum time2 fudge value for NMEA refclock?

2010-07-16 Thread Hal Murray

I created a symlink called gps0 to my serial port ttyS0, because it
told me that in the logs when I tried to start up ntpd without it.

Can somebody who uses the NMEA driver in linux tell me if there is
something else that I should have compiled in? gpsd works fine, but
every time I switch to the NMEA type 20 driver, it doesn't work. It
doesn't seem to write anything to the system logs, or clockstats
either.

You also need a bit more magic.  There should be good documentation
someplace, but I don't know where it is.  Try man ldattach


I'm using this in /etc/sysconfig/ntpd on Fedora

if [ ! -e /dev/gps12 ]; then  # GPS 18x LVC
  ln -s /dev/ttyS0 /dev/gps12
  setserial /dev/ttyS0 low_latency
  ldattach 18 /dev/gps12
  ln -s /dev/pps0 /dev/gpspps12
fi



-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] Batch of 4 NTP RFCs are out: 5905-5908

2010-06-21 Thread Hal Murray

RFC 5905
Title:  Network Time Protocol Version 4: 
Protocol and Algorithms Specification 
Pages:  110
Obsoletes:  RFC1305, RFC4330
URL:http://www.rfc-editor.org/rfc/rfc5905.txt

RFC 5906
Title:  Network Time Protocol Version 4: 
Autokey Specification 
Pages:  58
URL:http://www.rfc-editor.org/rfc/rfc5906.txt

RFC 5907
Title:  Definitions of Managed Objects for 
Network Time Protocol Version 4 (NTPv4) 
Pages:  26
URL:http://www.rfc-editor.org/rfc/rfc5907.txt

RFC 5908
Title:  Network Time Protocol (NTP) Server 
Option for DHCPv6 
Pages:  9
URL:http://www.rfc-editor.org/rfc/rfc5908.txt


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] SNTP with 1ms of precision?

2010-06-17 Thread Hal Murray
In article aanlktil2jbpj9p5eqfykgnjev8_ejr6ic_0cuodgf...@mail.gmail.com,
 Marcelo Pimenta marcelopiment...@gmail.com writes:

I thought that SNTP was used in a kind of Intranet with no routers and no
internet, so the low latency there is no need of so much calculations to
adjust the clock.

I haven't been able to figure out what you are really trying to ask.

The packets on the wire are the same for NTP and SNTP.  The results
you will get will depend upon the hardware and software you are using.

If you have a good/reference server on your local LAN, it should
be reasonable to get the clock on a client to within 1 ms most of
the time.  I would expect occasional quirks.  How many would depend
mostly on the software you are using.  (If somebody is going to get
hurt or killed if your clock is off by more than 1 ms, you should
do something else.)

You should probably setup a test bed and see how well it actually works.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] proprietary hardware clock as NTP reference source

2010-06-11 Thread Hal Murray
In article 40aa2d27-9826-4948-a405-e5b311358...@z8g2000yqz.googlegroups.com,
 apobrien apobriens...@gmail.com writes:
Hello list,

I have a set of proprietary hardware timing cards (Symmetricom
bc635PCIe) which synchronize their clocks using a dedicated
interconnect.  As you might imagine the timing card conditioned time
drifts from that of the hosts they're installed in.

What I'd like to do is make the master timing card's time into a NTP
reference clock then use NTP to distribute that time to the other
hosts in the (private) network.

I've looked at Orphan mode and undisciplined local clocks but they
only refer to the host's software clock if I'm not mistaken.  I've
also searched through the archive but I'm afraid I lack the
appropriate terminology to get meaningful results.

Can someone point me toward (some google words maybe) creating an
arbitrary NTP reference source (under Linux)?  I think I'm just
missing something very basic.

I've been looking at the LinuxPPS project as these cards output a PPS
that I might use to condition the host clock using Linux PPS but I
don't have a 8250 serial port on these new fangled PCs.

TIA!
Andy

I think you have two choices.

One is to write a stand alone program that talks to your hardware
and puts the info into shared memory where the shared-memory driver
(driver 28) can get it.  gpsd works this way.

The other is to write your own refclock-driver.  The usual
approach is to find a driver that is as close as you can get
and modify it.  If your changes are small and don't break the
old moce, you may be able to convince the ntp project to merge
them into the main source package.

It may be tricky to get started this way.  The best documentation
is to read the code.  There is some overview here, but it
probably won't help much until you look at the code:
  http://www.cis.udel.edu/~mills/ntp/html/howto.html

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Restrict vs DNS lookup

2010-06-07 Thread Hal Murray
In article 4c0bccfe.30...@ntp.org,
 Danny Mayer ma...@ntp.org writes:
On 6/6/2010 3:24 AM, Hal Murray wrote:
 https://bugs.ntp.org/show_bug.cgi?id=1568
 
 Dave Hart points out that ntp-dev has a server option to the restrict
 command.
 
 Description here:
   http://www.eecis.udel.edu/~mills/ntp/html/accopt.html
 
 Would somebody who uses restrict please check to see if this
 does what you want.
 
Hal,

If this is about my suggestion to add a server option for restrict lines
to allow easier control of packets from servers defined in the various
server/pool, etc. lines then neither of these references describe that.

Both mention restrict server
Yes, the part in accopt.html is hidden in the fine print.

The goal is to allow through packets from the servers you list even
though there may be other restrict lines.

I think restrict server will do that.

I hope somebody more familiar with restrict will double check.

I'm not sure I understand the intention of your note.

Danny

There have been occasional discussion here about the interactions
of DNS with restrict.  There was one recently.  I entered the
bug to collect thoughts and keep it from falling through the cracks.

It's possible that some work on the documentation will make
me happy and help others avoid confusion.  I think it's simple
after you understand it, but it took me a while to figure that
out and I'm not really sure I've got it right.

I think part of my confusion is that there are two things
you might want to do with restrict and DNS.

One is the case you mention, let through packets from servers that
are looked up via DNS when your restrict line would otherwise
block them.  I think the current code will do that.

The other possibility it to block servers from a CIDR block,
even if you get one from DNS.  This isn't interesting if
you trust the people running the servers you are using
and if you don't trust them, why are you using their servers?
But you might want to skip servers in XXX (pick your favorite
bad guy) even if they make it into the pool.

I think I'd be happy as documentating the latter case as not
working.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] Restrict vs DNS lookup

2010-06-06 Thread Hal Murray
https://bugs.ntp.org/show_bug.cgi?id=1568

Dave Hart points out that ntp-dev has a server option to the restrict
command.

Description here:
  http://www.eecis.udel.edu/~mills/ntp/html/accopt.html

Would somebody who uses restrict please check to see if this
does what you want.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Log client connections to ntpd server

2010-05-15 Thread Hal Murray
In article cca1921f-cdee-43f8-bc28-31a2a0982...@a27g2000prj.googlegroups.com,
 s a n ihsa...@gmail.com writes:

Thanks guys.. for the monlist and the tcpdump script info. Was exactly
what I was looking for.

Dave Hart recently cleaned this area up so the replacement for monlist
in ntp-dev now works for lots of clients.  Try
  ntpq -c mrulist

It would be nice if more people helped test it.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Is this normal?

2010-05-13 Thread Hal Murray
In article 
c430da47d51d0c4b940f6928bae21f4626a3f16...@sbkmxsmb06.win.dowjones.net
,
 Russell, David david.russ...@dowjones.com writes:
 The device is a piece of networking equipment and so I doubt that the crystal
 is temperature controlled but since it is in a data center the temperature
 and power demand is steady.

 If you could see the graph you would see that it seems to oscillate around
 -3.05 us/s over a 24 hour timeframe. The graph has a pretty nice looking 
 sine wave with a 12 hour period.  I was expecting that if the true drift
 rate were -3.05 then NTP would converge upon that value.  Are you saying
 that this oscillation is typical for non-temperature (cheap) crystals or
 should the drift look more random?

The drift follows temperature.  Do you have any way to measure the temperature?



 Any thoughts on validating a black box NTP process?

Setup NTP on another box and tell that box to use the black-box as a server.
Use noselect if you want to make sure it won't try to sync to that system.
Then turn on loopstats and peerstats.  That will give you lots of data to
look at.


 I had not realized until I sent out the email that no attachments are allowed.
 Is there a way to share a graph?

Put it on the web someplace and send a URL.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Help with Resolution SMT

2010-05-13 Thread Hal Murray
In article 4beb53a2.4050...@signaturealpha.com,
 Marc Leclerc marc-lecl...@signaturealpha.com writes:
Hi,

Seems the generic parser does't work with NTP with resolution SMT. Has 
anyone modified some source to make it work?. NTP reports answer as bad 
Data, but trimble studio hooked directly to the chip reports good data.

What exactly have you tried?

Have you tried the Palisade driver (29) with the Thunderbolt flag?

Have you tried using the Trimble software to switch it to NMEA mode
and then using the NMEA driver?

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Trimble Resolution SMT

2010-05-05 Thread Hal Murray
In article 4be025aa.4050...@signaturealpha.com,
 Marc Leclerc marc-lecl...@signaturealpha.com writes:

I am trying to have NTP use the trimble resolution SMT gps module, I
have tried other trimble clock driver without success so I assume that
one specific to the module has to be used. Unfortunately there does not
seems to be any way to search the mailing list to see if this was
discuss before. I would appreciate if anyone with information could get
back to me.

I am trying to make this work on an embedded linux platform, I already
have the linuxpps driver installed and have the /dev/pps0 node
available. the module is wired to /dev/ttyS1. Using the clock driver for
the palisade lead to wrong answer format messages.

The Palisade driver supports several different variations of
Trimble products.  Which one(s) did you try?

The data sheet says it speaks TISP and NMEA.  I don't know which
one is the default.  You might try running some helper code 
before starting ntpd to switch it to NMEA mode, and then telling
ntpd that it's a NMEA device.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How to debug PPS?

2010-05-05 Thread Hal Murray

GPGGA has one added benefit: If you turn on clockstats you get a log of 
the current position every second, this is perfect input for a 
statistical averaging of the current antenna position. :-)

It doesn't have the date.

GPRMC is the only one I know of with both time and date.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Cheap ($29.90) GPS receiver

2010-04-20 Thread Hal Murray

The serial chip does not do that.  It will send the interrupt at the
time it has assembled a full character.

Some of the serial chips have large FIFOs and wait until the FIFO
has several characters and/or there is no activity for a while.
The idea is to save CPU cycles by batching interrupts.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Cheap ($29.90) GPS receiver

2010-04-19 Thread Hal Murray

How precise can a 4800 baud serial port be in determining the start of a 
start bit?  About 1/4800s i.e. about 200 microseconds?  Don't the chips 
sample at 8 or 16 times baud rate, so couldn't the start bit be determined 
to ~25-30 microseconds?  And if the baud rate was lot higher (the unit 
claims 57600 baud)?

You would be using the unit in a slightly different mode to an existing 
GPS - just detecting the start of an RS-232 burst for the PPS, and then 
reading a message for the actual value

What you describe could be made to work quite well, but I've never
seen one that works that way.

The data sheet says 1 microsecond.  It also says SiRF chip set.
All the SiRF units that I've tested are horrible.  They aren't even
trying for good timing.

My guess is that the 1 microsecond was copied from another data
sheet that did have a PPS signal.

If anybody tests one of these, please let us know how well it works.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Cheap ($29.90) GPS receiver

2010-04-19 Thread Hal Murray
 I think that depends on how you set up the chip. I think you can set it
 up so it will interrupt on each byte. This is not terribly efficient for
 a serial port driver, but if it is timing you want, then that is
 probably what you want.

On linux, I use:
  setserial /dev/ttyS0 low_latency

Well, actually you probably want the interrupt
to occur at the beginning of the first start bit of the first
character, which could in theory on a 4800bd give you  sub ms resolution
( and maybe much better) .

That's just a constant offset.  You can correct for that.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Quick sync between two computers not connected to the internet

2010-03-24 Thread Hal Murray
In article 0f5de21d-2a20-40fa-ab68-a03cba5ae...@u9g2000yqb.googlegroups.com,
 Evandro Menezes evan...@mailinator.com writes:
On Mar 23, 11:38=A0am, Chuck Swiger cswi...@mac.com wrote:

 If I really had to solve the latter problem, I would likely connect the m=
achines to a valid NTP timesource long enough to calibrate each machines' i=
ntrinsic drift from realtime, and then run time in standalone mode against =
their local clock.

Useless.  Clocks may drift wildly due to temperature changes, be it
ambient or inside the box.

The temperature drifts that I've seen are much smaller than the
basic calibration.

On the other hand recent Linux kernels have screwed up the basic
calibration on startup so rebooting a machine is much worse than
a temperature change.  (If they have fixed it recently, I haven't
seen any announcement.  You can fix it by hacking a constant into
your kernel.)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Which version of Linux works best?

2010-03-11 Thread Hal Murray
 Modern Linux kernels don't support PPS in the sense of RFC-whateveritis.

 There is support for an ioctl that says wake me up when a modem signal 
 changes.
 gpsd uses that to provide PPS support.  I don't have any data.

I believe but am not sure, that that uses an interrupt.

I think so.  But the point is that with the PPS support, the
kernel grabs a timestamp in the interrupt routine.  The ioctl
stuff just wakes up the user program so it can grab the timestamp.
On a lightly loaded system, that will probably work OK.  But if
the system gets busy, there will be more noise in the data.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] GPS_NEMA, but high offset and jitter?

2010-02-24 Thread Hal Murray
In article 4b8580e5$0$1616$742ec...@news.sonic.net,
 Kelsey Cummings k...@sonic.net writes:

I'm not sure why it lost sync but I went ahead and upgraded to 4.2.7p5 
from the ntp-dev port.

I'm still seeing high offset and variable jitter.

==
xGPS_NMEA(1)  .GPS.  0 l   45   64  3770.000  -311.36  75.859
-time.sr207.200.81.. 2 u  348  512  3770.6430.977   2.984
*clock.sjc.he .CDMA. 1 u  362  512  3776.348   -2.584   0.289

The NMEA driver is a bit strange.  It processes two sources of time.
One is the text on the serial port.  The other is the PPS signal.

I think it has to get close enough on the text mode before the PPS
processing kicks in.

How about turning off the PPS fudge flag so you know you are
using the text mode.  Then watch it for a while and add a
fudge time2 to get it reasonably close.  When that works,
turn the PPS back on.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP servers redundancy

2010-01-19 Thread Hal Murray
In article 
1245298544.863191263816061789.javamail.r...@spooler9-g27.priv.proxad.net,
 j...@free.fr writes:
Hello everybody,

for a ship project, we've got a LAN with two NTP servers
 synchronised by a masterclock, itself synchronized by GPS.
The idea was to have redundancy between the 2 servers, to
 ensure continuous synchronization to the clients in case
 one of the server went down.

What sort of thing is your master clock?  Does it speak NTP?
If not, how does the timing info get from the master to the
NTP servers?

How many systems are going to be using your NTP servers?
What sort of accuracy do you need?  What sort of reliability?

Suppose you only had one server.  How long would it take to
fix it if something went wrong?  How expensive would that be?
(In terms of lost data rather than just the cost of fixing it.)


I wonder now if the dual NTP source architecture is the good one :

Maybe, but maybe not.

In general, 2 is a nasty number for ntp.  How do you tell which one
is better?

One server is simpler and easier to understand.




Is the clock hopping resulting of this dual architecture a real problem ??

Probably not.  That's the sort of thing you have to try.

You should also try seeing what happens if you only have one server
and it gets unplugged.

In general, if a system has been up for a while (day or two) it
will coast if it can't contact any servers.  That coasting may
be good enough.  It will drift more if the temperature changes.


Does the NTP algorithm enable that when a server go down
 (or is no more synchronized), its clients switch easily
 to the second one, without any visible synchronization interruption ?? 

Will it be transparent for the clients when the first server will be back ?

If one dies, the clients will switch to the other one.  Maybe they
won't do it as fast as you would like.

There may be hiccups.  It depends on how accurate you need the time
to be.


How shall be the clients configured for this architecture ??

  server host1
  server host2

Thanks a lot for your help.

Jean



-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP servers redundancy

2010-01-19 Thread Hal Murray

The fundamental problem with two servers is this: which one do you 
believe when the two differ?  You know that at least one of the two must 
be wrong but it's impossible to determine WHICH one!

You get more than time from a packet exchange.  You also get
a good idea of the accuracy.  Two clocks can give (slightly)
different answers without either being wrong.  If that happens
you can use either one.

The problem is that IF they give wildly different answers
(perhaps because one of them is broken) THEN you don't know
which one is good.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Is dispersion jitter in all situations

2010-01-05 Thread Hal Murray
In article slrnhk7469.kji.un...@wormhole.physics.ubc.ca,
 unruh un...@wormhole.physics.ubc.ca writes:

As I said, it is possible that all outgoing ntp requests go via a 1Gb
ethernet, and all return packets go via a 300baud modem. In that case
the estimate of 1/2 the round trip would be a good estimate of the
systematic error. Unfortunately there is absolutely nothing ntp can do
on its own to figure that out. 

A more likely cause for asymmetry is queueing delays on home DSL links.
Nasty.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] ntpd goes into oscillation

2009-12-30 Thread Hal Murray
In article slrnhjkta6.4e4.un...@wormhole.physics.ubc.ca,
 unruh un...@wormhole.physics.ubc.ca writes:
ntpd has suddenly broken out into oscillations. it is fed by a Garmin
18 LVC PPS via shm. The oscillation has a period of just under an hour (
about 50 min) and an amplitude of about 10usec. in the offsets (
amplitude of about .005PPM in the rate). Since this is acting as the
clock for a number of other machines, they are also showing the
oscillation especially in the rate.
While I suppose this could be something in the GPS itself, it looks more
like an oscillation in ntpd.
Nothing changed when the oscillations started. Ntpd had been started
on Dec 14, and this change began on Dec24.
You can see the graph on www.theory.physics.ubc.ca/chrony/chrony.html ,
the graph for the machine called string.

Has anyone else ever seen this kind of thing?

What OS?  (version?)

What is the temperature like?

If you feed a sawtooth into a PLL, the offset will be the derivative,
a square wave.  The amplitude of the square wave is smaller with
higher gain.  A sawtooth with a 1 hour period is possible from
air conditioners.


I've seen oscillations on boxes using the pool, or at least stuff
that looks like oscillations to my eyeball.  That's on Linux.
(They have been fixing the timekeeping code.  I wouldn't be
surprised by anything.)

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Tobit LAN!Time DCF77 receiver not working

2009-12-26 Thread Hal Murray

Over the years I've come to the conclusion that it's easier to rewrite 
from scratch than to reverse engineer someone else's code.  Especially 
so when no effort is made to document what the code is doing, the 
algorithms used, what the variables represent, etc.  Far too many people 
code in just this way!

Yes there is a lot of shitty code out there, but sometimes it's
the only documentation you can get.  If nothing else, you may
want to scan it to extract some key ideas needed to write your
own version.

Personally, I don't want comments that tell me stuff I can
figure out by glancing at the code.  What I want is clues
about the strange things like feature X doesn't work on OS Y,
or watch out for overflows.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Tobit LAN!Time DCF77 receiver not working

2009-12-23 Thread Hal Murray
Does the software include any documentation explaining what this output 
means?  It certainly does not seem to be in any way useful unless there 
is some explanation of the output.

If there is none, I'd drop it in the garbage and use something else!

Or look at the source code.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Busybox and ntp

2009-12-18 Thread Hal Murray

but have hit some snags where certain commands are not supported in
busybox (service start/stop/reset, chkconfig).

service is just a script/program to run one of the start/stop
scritps.  It may be a redhat/fedora/linux thing.  google will
find the man page.

chkconfig is a utility to setup the links for starting
and stopping services.  Again, there is a man page.

If you aren't familiar with how servers get started/stopped,
look in /etc/rc.d and friends.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Monitor of NTP service

2009-11-20 Thread Hal Murray
I have several AIX Unix 5.2 serves that point to a Cisco router as the
NTP time source.

Is there any way I could monitor the time source and against the
servers to ensure that they are in sync?

Or how are others performing time source/server monitoring?

I'm assuming you want to do the monitoring from another system.

Setup ntpd on that system.

Turn on some of the statistics collection.
  details are in monopt.html
  loopstats will tell you what ntpd thinks of it's local clock.
  peerstats will tell you what the other systems look like.
I use filegen xxx file xxx type day link to break things up
into a file per day.

Then add
  server xxx
for each system you want to monitor.
  you can adjust minpoll and maxpoll to control how often they get polled
  you can turn on noselect if you think the monitoring system might get 
confused.

That will collect a bunch of data.  Then you can graph it or whatever
you want.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] mtp srver load figures?

2009-11-19 Thread Hal Murray

I'm preparing to build a few ntp servers for a somewhat large population of
NTP-misbehaving boxes (they top out at a 120 sec interval).

So, to size this right - what kind of request load can I safely throw
at ntpd on a current Xeon server?

Is 200 requests per second a problem?
What do you calculate?

Don't calculate, measure.

I just measured over 5000 packets per second on a 1 GHz Via.


You didn't specify what OS you are using.  That may change things
by a factor of two or more.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


  1   2   3   4   >