[ntp:questions] Extracting ntpq like information programmatically

Claudio Carbone erupter at libero.it
Sat Mar 30 11:22:09 UTC 2013

Thank you to those who answered, I'm learning a great deal about network 
time compensation.

On 30/03/13 07:55, David Taylor wrote:
> Claudio,
> I offer you three monitoring techniques - two programs and MRTG. The 
> programs are listed here:

Thank you David, I had already spotted your site in another message to 
this list/ng, unfortunately I work under linux, so can't use your 
programs. But it was really interesting none the less.

On 29/03/13 21:20, John Hasler wrote:
> NTP has already used the offset to correct the system clock. You don't 
> need or want to do anything. When NTP says that the clocks are 
> synchronized they are as close as it is possible to get them over the 
> network. 

Then why does NTP give a number to the offset and delay?
If the algorithm knows that it's lagging by X s, why doesn't it correct 
for that lag?
Alternatively, from my point of view, it ought to say that the clocks 
are synchronized to the best of its knowledge without providing delays 
and offsets.

On 29/03/13 21:12, Chuck Swiger wrote:
>> If so why doesn't the offset oscillate?
> It usually does, although the most common type of cyclical offset variations occur with a period of 24 hours, resulting from day/night temperature changes affecting the quartz crystal.
I may have much faster temperature variations in my case: embedded 
boards do vary their core temperature a lot according to their loading. 
No air conditioning can solve this, as my embedded boards are inside a 
very small case and near batteries and motors (as I said previously I'm 
managing a fleet of small robots).

> A well-designed compensation system doesn't over-force the corrective adjustment being made and thus avoids overshooting and then "ringing" back and forth across the setpoint.
Sure but a well-designed compensation system should also keep lagging or 
leading to avoid oscillation.

I'm trying to understand here.
If I send a message through a route, each machine adding their own 
timestamp (kernel provided timestamp) at the time of processing, let's 
say that between machines 2 and 3 there is a lag of 3.5ms.
Now if I knew that the clock of machine 2 was lagging the time server by 
2ms and the clock of machine 3 was leading the time server by 0.5 ms, 
why does this not mean that my real lag is 1ms ?

Have all a nice Easter holiday.


More information about the questions mailing list