Re: [chrony-users] Best way to force clock step at shutdown |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-users] Best way to force clock step at shutdown
- From: Hector Oron <hector.oron@xxxxxxxxx>
- Date: Tue, 12 Jan 2016 15:56:31 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=rCR8zmch18izVagk10O/YHVJXyBAQ79jCRgDTpPza+I=; b=0tiysyyxpGZk3GkP3xFn9ljN8uS+vRIhq8DBsT1jQCyCYSIaNg9X15tWHrX/GPtBXr aGIbc8usWUqhm3iVYMcUAcz9ivBWChz71qTv/LRPcS3H1sZv3xtDYFA+Ni9KAeacwnKG t+EL4W8dF15/l5Rm1jgVinRCufBJRqTFO7gJL2GarKbH4Qwi9+7TlkOLO6BnmRJji9OJ MYs5A28CcL6u9zD+AxubN9eZCuHO7MCnQPEIorRk0y4XnotIx2dao5HIYYnotMNcjODK 3wTk1zmU020DWwkSDybA2gbu3vxvGWxHj9kaj9QzabcgvXqOaMFGhWqAboY7avIILplE 8JWg==
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.