RE: [chrony-dev] timex kernel offset parameter not updated

2024-03-12 Thread Filip Verwee
Ok, thanks for the information.

Regards,
Filip Verwee.

-Original Message-
From: Miroslav Lichvar  
Sent: Tuesday, March 12, 2024 10:02 AM
To: [email protected]
Subject: Re: [chrony-dev] timex kernel offset parameter not updated

On Tue, Mar 12, 2024 at 08:35:43AM +, Filip Verwee wrote:
> Hi Miroslav,
> 
> Thanks for the reply.
> 
> Even if chronyd is not using the kernel PLL, wouldn't it be still possible to 
> update the offset parameter?

No, the offset can be set only when the PLL is enabled. In the kernel code 
(kernel/time/ntp.c):

static void ntp_update_offset(long offset) {
s64 freq_adj;
s64 offset64;
long secs;

if (!(time_status & STA_PLL))
return;

Even if it could be set and it did nothing except being reported back in timex, 
chronyd would need to update it periodically to be useful.
I don't think that would be acceptable as chronyd is supposed to be friendly to 
power saving.

--
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].


--
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



Re: [chrony-dev] timex kernel offset parameter not updated

2024-03-12 Thread Miroslav Lichvar
On Tue, Mar 12, 2024 at 08:35:43AM +, Filip Verwee wrote:
> Hi Miroslav,
> 
> Thanks for the reply.
> 
> Even if chronyd is not using the kernel PLL, wouldn't it be still possible to 
> update the offset parameter?

No, the offset can be set only when the PLL is enabled. In the
kernel code (kernel/time/ntp.c):

static void ntp_update_offset(long offset)
{
s64 freq_adj;
s64 offset64;
long secs;

if (!(time_status & STA_PLL))
return;

Even if it could be set and it did nothing except being reported back
in timex, chronyd would need to update it periodically to be useful.
I don't think that would be acceptable as chronyd is supposed to be
friendly to power saving.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



RE: [chrony-dev] timex kernel offset parameter not updated

2024-03-12 Thread Filip Verwee
Hi Miroslav,

Thanks for the reply.

Even if chronyd is not using the kernel PLL, wouldn't it be still possible to 
update the offset parameter?

Regards,
Filip Verwee.

-Original Message-
From: Miroslav Lichvar  
Sent: Tuesday, March 12, 2024 9:16 AM
To: [email protected]
Subject: Re: [chrony-dev] timex kernel offset parameter not updated

On Tue, Mar 12, 2024 at 08:04:04AM +, Filip Verwee wrote:
> Dear,
> 
> On our cluster nodes we use node-exporter to collect the timex information 
> from the kernel. The advantage of using the node-exporter timex collector is 
> that it is independent of the NTP implementation used on the nodes (ntpd, 
> chrony...). Unfortunately, it looks like chrony is not updating the timex 
> kernel offset parameter. Its value is always '0' while on nodes using ntpd, 
> the timex kernel offset parameter represents the time offset in between local 
> system and reference clock.
> This seems like a shortcoming in chrony. Are there any plans to implement 
> this functionality in the near future?

That is not possible as chronyd doesn't use the kernel PLL. The closest thing 
to the kernel PLL offset would be the chronyc tracking offset.

--
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].


--
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].



Re: [chrony-dev] timex kernel offset parameter not updated

2024-03-12 Thread Miroslav Lichvar
On Tue, Mar 12, 2024 at 08:04:04AM +, Filip Verwee wrote:
> Dear,
> 
> On our cluster nodes we use node-exporter to collect the timex information 
> from the kernel. The advantage of using the node-exporter timex collector is 
> that it is independent of the NTP implementation used on the nodes (ntpd, 
> chrony...). Unfortunately, it looks like chrony is not updating the timex 
> kernel offset parameter. Its value is always '0' while on nodes using ntpd, 
> the timex kernel offset parameter represents the time offset in between local 
> system and reference clock.
> This seems like a shortcoming in chrony. Are there any plans to implement 
> this functionality in the near future?

That is not possible as chronyd doesn't use the kernel PLL. The
closest thing to the kernel PLL offset would be the chronyc tracking
offset.

-- 
Miroslav Lichvar


-- 
To unsubscribe email [email protected] with "unsubscribe" 
in the subject.
For help email [email protected] with "help" in the 
subject.
Trouble?  Email [email protected].