Re: [chrony-users] Which command is better to force chrony to synchronize time right now -- chronyc burst or chronyc waitsync?

[ Thread Index | Date Index | More Archives ]

Hello Miroslav,

Wednesday, October 22, 2014, 7:21:27 AM, you wrote:

> On Tue, Oct 21, 2014 at 03:34:39PM -0400, Rufe Glick wrote:
>> I am looking for an equivalent of 'ntpdate' command
>> in  the  chrony  suite to force chronyd to synchronize time right now.
>> On the internet I found suggestions to either use 'chronyc -a 1/4  burst'
>> or  'chronyc  waitsync'. Which one is better for the purpose?  After
>> reading  the  manual I guess that waitsync is better. Please confirm,
>> refute or recommend something else.

> The waitsync command just waits until the clock is synchronized within
> certain limits, it doesn't tell chronyd to make new measurements
> immediately or anything like that. It's mainly useful to block
> starting services on boot, so they don't observe any jumps in time.

> If chronyd isn't already running, a command similar to 'ntpdate
>' could be (since version 1.30):

> chronyd -q 'server iburst'

> If it's already running and it has some servers configured, an
> equivalent would be:

> chronyc -a 'burst 4/4'

> If you want chronyd to also step the clock instead of slewing if there
> is a larger offset and chrony.conf doesn't include an unlimited makestep
> directive, you will also need to wait until the new measurements are
> made and then tell chronyd to make the step:

> sleep 10
> chronyc -a makestep

> Is this what you are looking for?

Yes, that seems to be what I was looking for.

One  follow  up question. Why do you suggest to call 'sleep 10' before
'chronyc -a makestep'? What does it do?


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+