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 Tue, Nov 07, 2017 at 02:27:50PM -0700, James Feeney wrote:
> On 11/06/2017 09:17 AM, Miroslav Lichvar wrote:
> > For example, if the initial offset was 5 seconds and the system clock
> > was already corrected by 2 seconds when another measurement is made,
> > which says the offset of the system clock is now actually 4 seconds
> > instead of the expected 3, a message will be logged that the clock is
> > wrong by 1 second. The question is which offset of the system clock
> > should be reported (4 or 1) and when it should be reported (abs(4) >
> > logchange or abs(1) > logchange).
>
> Ahhhhh - too many small numbers - is the "1" from the "5-4" or from the "4-3"?
It's the "4-3".
> I do not understand in what sense the clock is then wrong by 1 second. And, I am thinking that the log message should never say that - too confusing. If I am understanding, you are saying that currently, a message like that would be logged - and maybe there should not be a message like that. It is not immediately evident to me why a message like that would be informative. It may be better to only log a simpler message, describing the *current* relationship between the system clock and the NTP server clock.
I think the idea was to warn the user when the clock needs a larger
adjustment. The logchange directive which configures this message is
described in the manual as "the threshold for the adjustment of the
system clock that will generate a syslog message. An example ...
message to be generated if a system clock error of over 0.1 seconds
starts to be compensated".
So, if there is a large adjustment running and a new measurement says
the offset of the clock is not what expect (e.g. the clock or the
server has drifted for some reason), should we report by how much the
adjustment which is still running had to be adjusted, or the total
amount of the remaining adjustment? Currently, it's the former.
> So, there could be an initial message, for instance, "The system clock is leading/lagging the NTP server clock by N seconds", followed by one of two differing follow-up messages, depending upon whether the system clock is corrected by slewing or by stepping. For slewing, there could be a message that simply says something like "Slewing the system clock forward/backward, correction started.", and for stepping, a message something like "Stepping the system clock forward/backward by N seconds."
What value should be reported if the previous slew didn't finish yet?
That's the normal case. It's just that the slew is rarely larger than
logchange.
--
Miroslav Lichvar
--
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.