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 chrony.tuxfamily.org/chrony-users Archives ]


On Tue, Oct 21, 2014 at 03:34:39PM -0400, Rufe Glick wrote:
> I am looking for an equivalent of 'ntpdate pool.ntp.org' 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
pool.ntp.org' could be (since version 1.30):

chronyd -q 'server pool.ntp.org 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?

-- 
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+ http://listengine.tuxfamily.org/