| Re: [chrony-dev] chronyc: CSV output rounds frequency fields to 3 decimals |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: Markus Kovero <mui@xxxxxx>
- Subject: Re: [chrony-dev] chronyc: CSV output rounds frequency fields to 3 decimals
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Tue, 22 Sep 2026 09:58:32 +0200
- Cc: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790063928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TvevC9gMZMWnO6ZwZcFvo+y/I9vLnra41OMy56IPxAA=; b=BEzA3QvTNk3c3bkQnrrF4CqtSHmEebvExQQ6zivsllCQzl8YEZL5UQ8o5RVtL/SH8LeFhw /yTxJVPDUjYKI/EHZS1+tL0cNm+l8XenT6QOqQuWGIyzjm+u2J9VTPY5FmD0r4DhLMwrVT B0p4zJVzAw077lPcFmyLR8Eiooc403s=
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
--
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.