Re: [chrony-users] Best way to force clock step at shutdown

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Hello,

2016-01-12 14:33 GMT+01:00 Miroslav Lichvar <mlichvar@xxxxxxxxxx>:
> On Tue, Jan 12, 2016 at 01:26:13PM +0100, Hector Oron wrote:

>> > If measurements were made not too long before the shutdown, i.e.
>> > chronyd knows the current offset and is correcting it by slewing
>> > you just need to call chronyc -a makestep to force it to step the
>> > clock.
>>
>> chronyd is running,
>>   root      1143  0.0  0.0  97212  2624 ?        S    08:28   0:00
>> /usr/sbin/chronyd
>>
>> however calling makestep does not get clock on time:
>>
>> $ date ; sudo chronyc -a makestep ; date
>> Mon Nov 23 08:10:55 GMT 2015
>> 200 OK
>> 200 OK
>> Mon Nov 23 08:10:55 GMT 2015

> How long ago was the clock set to this date? If chronyd hadn't had a
> chance to make new measurements in that interval, the makestep command
> would not fix the offset as chronyd would still think the date is
> correct. It would be useful to see the output from chronyc tracking
> and chronyc sources before the makestep command.

I change time manually for the tests, so we are talking minutes, maybe
1 or maybe 5.
How long does it need chronyd to take measurements? I assume the only
way to force it to do measurements is with the burst command.

>> $ sudo chronyd -q
>> 2015-11-23T08:14:07Z chronyd version 1.30 starting
>> 2015-11-23T08:14:07Z Frequency -0.569 +/- 0.680 ppm read from
>> /var/lib/chrony/chrony.drift
>> 2015-11-23T08:14:07Z No suitable source for synchronisation
>> 2015-11-23T08:14:07Z chronyd exiting

> Interesting. Any chance the sources in the config are specified with
> the offline option and some service script or networking hook switches
> them online after chronyd is started?

I have a Network Manager hook similar to:
  https://github.com/frugalware/frugalware-current/blob/master/source/network-extra/networkmanager-dispatcher-chrony/10-chrony

The sources are listed under /etc/chrony/chrony.conf with the offline option:
  server 0.xxxx.pool.ntp.org offline minpoll 8

Regards
-- 
 Héctor Orón  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . ..-.

--
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/