Re: starting chronyd -q unreliable

Miroslav Lichvar <[email protected]>
Newsgroups gmane.comp.time.chrony.user
Message-ID <ZKu/BI6BItQ2j+QH@localhost>
On Fri, Jul 07, 2023 at 11:14:50AM -0500, Calvin Arndt wrote:
> chronyd -q should perform requested operation then exit. 
> It should never stay running. 
> 
> I start chrony daily via cron from another machine.
> 15 00 * * * ssh [email protected] "chronyd -q 'pool pool.ntp.org
> iburst'"

If you really need to run chronyd from cron, you should add a random
sleep there to avoid contributing to huge spikes in traffic that
public servers get on minute marks.

But you would get much better performance if the daemon was running
continuously even with maxpoll of 17 (i.e. one request per 36 hours
per server instead of 4 requests in an iburst per day).

> So I start killing it an hour before via cron.
> 14 00 * * * ssh [email protected] "kill `pidof chronyd`|&grep -v
> 'usage:'"
> 
> This works fine for a month or so and then wala its back again.
> This should never happen.

The termination when there is no clock update was fixed in chrony-4.3.

As a workaround you can use the -t option to exit after a timeout.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "unsubscribe" in the subject.
For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "help" in the subject.
Trouble?  Email [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.