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 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.


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.


Is there really a sign associated with the system time reported in the log?

Yes. The offset can be positive or negative.


and indicate whether it's fast or slow in parentheses?

If that is necessary, yes, that would work.  I'm just not clear about the sign thing, and that the term "wrong" with a back-reference needs to be used.



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.

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



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.


But then, I'd like to see an explicit 'plus' sign on the numbers, when appropriate, along with the explicit 'minus' sign, to make clear that the numbers are actually signed, and are not simply magnitudes.

--
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.


--
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/