Re: [chrony-users] Request: Add an optional timeout option for 'chronyd -q ...'

[ Thread Index | Date Index | More Archives ]

On Thu, Dec 01, 2016 at 06:30:22AM -0600, Lonnie Abelbeck wrote:
> Certainly, If a cron job was used to periodically call chronyd instead of ntpdate, a "-t timeout_secs" option would be quite useful to make sure a stuck/delayed chronyd would not prevent later chronyd's from running.

I'd not recommend using a cron job, but rather something with random
sleeps between the starts, so multiple clients are not sending
requests at the same time. If you wanted it to correct frequency, it
would have to be without the -q option as it can only step the clock
without any adjustment of the frequency.

> Just to be clear, I would suggest chronyd should not return 0 if the timeout was reached and exited.

How about returning 0 if the clock was in a synchronised state (the
reference was updated at least once) and 1 if not? With -q that would
be 0 only if the clock was stepped.

Miroslav Lichvar

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+