Re: [chrony-dev] new feature request: add "fast" and "slow" to "clock wrong" and "clock stepped" log messages

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On 10/30/2017 02:42 PM, Bill Unruh wrote:
> On Mon, 30 Oct 2017, James Feeney wrote:
>> On 10/30/2017 05:07 AM, Miroslav Lichvar wrote:
>>> existing scripts that parse the log
>>
>> I am not familiar with any of those scripts - who parses chrony log files? - so my initial reaction is to be unsympathetic.  But I don't know - how important is that?
> 
> I certainly do. Mind you I convert the time to seconds myself with awk.

Ok - and you would need to modify your script, if the word "wrong" was removed, but not if there were trailing text?

>>> Do you think it would make sense to keep the sign ...
>>
>> I am confused - unclear about what chrony is actually reporting.  In my example, the implicit sign was positive, '+'.  But then, in apparent contradiction, "chronyc tracking" reports "Frequency       : 5.626 ppm slow", which would have accumulated a *negative* offset, '-', of the system time relative to the actual UTC time.
> 
> The frequency and the offset are not really related to each other.

Uhm - no.  The system clock frequency and the instantaneous system clock offset on reboot really *are* related to each other.

>> Is there really a sign associated with the system time reported in the log?
> 
> Yes. The offset can be positive or negative.

Ok.  All of my hardware clocks must be slow.

>> Of course, the phrases "stepped forward" and "stepped backward" can be used without putting the words "forward" and "backward" in parentheses.  Still, saying "stepped backward by -2.000000 seconds" would have the flavor of a double negative.  Similarly, the phrase "slow by -2.000000 seconds" would have a nagging ambiguity about it.
> 
> If you were going to keep the sign, then you would choose one or the other
> (ahead or behind is far better than fast or slow, since those are rate terms,
> not offset term. A clock can be slow and still be ahead. Eg the clock could
> tick only 59 times per minute, and yet be set ahead.

Yes, ok, "ahead" and "behind".

But again, frequency errors in my system clock are the cause of instantaneous offsets in the current time.  The time is not being set from scratch, with a clock that has never been set.  Technically, there are two pieces of information to be stated: 1) the frequency error or drift rate, and 2) the instantaneous absolute offset error.  The displayed units serve to distinguish these, "seconds per second" for a frequency error, and "seconds" for an offset error, and so this is already clear in the system log message.  I suppose it depends on what language you are use to hearing, as far as fast/slow or ahead/behind.

> So, the clock is -3.564452 ahead of NTP time is pretty unambiguous.

Ha!  No, that sounds like an explicitly contradictory statement to me.  I'm not even sure what you are trying to say with that example.

>> If chrony were to use explicitly signed numbers in the log messages, the parenthetic slow/fast and forward/backward would be most appropriate.
> 
> It does explicity use signed numbers.
> 
> A few lines from my measurements.log
> 
> ========================================
>    Date (UTC) Time     IP Address   L St 1234 abc 5678 LP RP Score Offset Peer del. Peer disp. Root del.  Root disp.
>    ========================================================================================================================
>    2017-10-22 11:02:59 142.103.234.23  N  1 1111 111 1111  6  6 1.00 -3.600e-04  2.440e-02  1.007e-06  0.000e+00  3.052e-05
> 
> Note the -3.600 in the offset column.

I'm confused - why are you presenting your measurements.log?  The log file message that I was discussing was the chrony message in the system log.

So, when you said, above, that "The offset can be positive or negative", were you actually talking about your "measurements.log", and not the system log?

Was my meaning unclear? "Explicitly signed" means that a positive number always has an explicit leading '+'.  Of course that is still only suggestive, that the number could just as well have been negative, and does not represent a simple magnitude.  But that would be my interpretation.

I am back to guessing that chrony does not use signed numbers in the system log message, not having actually looked at the code myself.

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/