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/31/2017 05:12 AM, Miroslav Lichvar wrote:
>> For system logs messages
>> "ahead" / "behind" for offset
>> "fast" / "slow" for freq
> That looks good to me.
"ahead" and "behind" also will work for both the offset message and the "was stepped" message.
> Another question is whether it's correct to say "System clock". The
> messages don't actually print the offset of the system clock, but
> rather the change in the offset relative to the NTP time that chronyd
> is tracking. On start that is the same as the offset of the system
> clock, but if there is an unfinished correction, it's the difference
> between the old offset and new offset.
I'm sorry, I don't understand. What does that mean, "the change in the offset"?
The quantity ( system_clock_time - NTP_server_time ), I think I understand.
Now, are you describing something like
(( new_system_clock_time - new_NTP_server_time ) -
( old_system_clock_time - old_NTP_server_time ))?
Are you saying that there is a system log message that would be saying "the system clock was behind by 5 seconds, but now, after some correction, the system clock is behind by only 3 seconds, and the offset has been 'reduced' by 2 seconds"?
That is what "the difference between the old offset and new offset" suggests to me. But then - really? Is chrony reporting that? Why would anyone want to see a report about that? Instead, it might be useful to know, in that example, that there was still 3 seconds of correction remaining. But that quantity would be exactly the same as saying "the system clock is now behind by 3 seconds".
So, I need some help there.
> There are at least the following options:
> 1. change the message to better describe what is behind or ahead
> 2. change the message to print the real offset of the system clock
> a) print it on each update as long as the offset is larger than
> logchange
> b) print it only when the change in the offset is larger than
> logchange
>
> Thoughts?
If I am understanding, I think I prefer option '2.a)'.
Option '2.b)' does not tell me what event is going to compel a system log message - at the first state-change? And only once? Where option '2.a)' will print a log message "on each update" - which I don't know when chrony normally makes those updates - but then, the log messages would inform me. That sounds like a good thing.
I am suspicious that option '1.' means having to describe some really complicated concept, this "change in the offset". But I'm only guessing, since I don't actually understand the "what". Could you give an example?
In common speaking, I still tend to speak in terms of frequency. I might say something like "That clock is running fast" and "That clock is running slow", where "running" and "slow" are adjectives, as in a "fast running clock" and a "slow running clock". Somehow, instinctively, that is the information for which I am searching. I can infer a "slow clock" when the system clock offset is "behind", but in my mind, I want to reduce the concept to an effective relative frequency. Of course, subsequently, I will want to quantify the resulting offset.
I don't know that other people do that in their head. But it might be something to consider, in the printing of system log messages. A "complicated" log message might say something like "The system clock is slow and is behind by 3.000000 seconds." That's a bit more like natural human speech - though it may not be as "manly" as a terse and cryptic log message. Ha!
Of course, there are also assumptions there,
1) that there exists some local reference clock, and
2) that local clock had been set to the correct time in the past, and
3) that that local clock was used to set the system clock, and
4) the system clock is an analog of the local reference clock.
Assumption 4 is not actually valid if, for instance, the local reference clock and the system clock operate from different crystals, which is common. The system clock might actually run fast while the local clock runs slow. But, as you suggest, the casual assumption is also that "the offset is larger than logchange", which, I think, leaves us pretty much in the realm of setting the system clock at boot-up, or at wake-up. I suspect that the casual user understands this. Once the system clock has been set, tweaking the system clock drift is at a very different scale, and no system log message is printed for that change.
I'm also assuming that booting a device that has no local reference clock, like a network appliance, a router or a switch or an access point, there is not going to be any "offset" message or any "stepped by" message printed in the system log. Or, maybe the system clock time simply defaults to the epic, "0", and the offset to the current time is shown?
--
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.