| Re: [chrony-dev] chronyc: CSV output rounds frequency fields to 3 decimals |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: "Miroslav Lichvar" <mlichvar@xxxxxxxxxx>
- Subject: Re: [chrony-dev] chronyc: CSV output rounds frequency fields to 3 decimals
- From: "Markus Kovero" <mui@xxxxxx>
- Date: Tue, 22 Sep 2026 09:21:37 +0000
- Cc: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Dkim-signature: a=rsa-sha256; bh=KUTDW80UfYcYCjpdoZzMLOZVyGNp9garDlxUhJbHzM4=; c=simple/simple; d=mui.fi; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1790068907; v=1; x=1790673707; b=NZdTVLvBVM1wy6HiPioP/EqtGJE5hb8sILRUx7p9wzIJ2TUhyAMYMeAb9e2O8pHzQiz7h3NL CZDZBRGEhCKJTQJFoG7Y7K/90fwTAHno2SGxW+g8Rk6GZFBLs8taFi8pPEG2KKdj67u8fwcd/dP m+px2HRIUO1MoDgC23vYoITrhDfFpL0RcIpyiw9y9mLV3YxbighUsLil0wQks0Z6kI5ImgbJqgQ MBY9P9/97BetbUKtfWLBgyIH9jOCDtkCf2tNWrhZBFlhOrRoAUZZH89KmmKqnzENxqz1mR6pyN5 xEoio42rsszANGsJsG8o+4h04fNxDzpvSH/EpXt3UuEyQ==
- Tls-required: No
On Mon, Sep 21, 2026 at 07:22:53PM +0300, Markus Kovero wrote:
The whole frequency error is about a third of one printed LSB, and skew is
five orders below it.
chronyd already carries more precision elsewhere: the drift file writes 6
decimals of ppm, and the adjtimex freq field it drives resolves 2^-16 ppm
(1.53e-11). Reading the kernel directly is currently the only way to get a
value chronyd already knows.
Would a change to give 'F' and 'P' the same precision as offsets in CSV
mode be acceptable -- prec = 9, or 6 to match the drift file? Column width
is not a concern for a parsed format, and extra digits do not affect float
parsers. I am happy to send a patch if so.
I occasionally hit this problem with skew showing up as 0 too. More
digits might be misleading with larger values. I think the best
solution would be to add a new chronyc option to switch to the
exponential %e notation with the number of digits matching the custom
32-bit floating-point format used in the chronyd<->chronyc protocol,
so it will print what it actually gets from chronyd.
I'll look into it.
--
Miroslav Lichvar
That sounds better than what I suggested — matching the digits to the
wire format handles the large-value case my fixed-precision idea would
have got wrong, and it covers skew reading 0 as well. Happy to test a
patch on a rubidium-referenced host if that is useful; the offset here
sits around 2e-11, so it exercises the small end.
Thanks for this)
Br
Markus Kovero