Re: [chrony-dev] Wake from sleep on OS X

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


> On 3/12/2015, at 4:51 AM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> 
> On Thu, Dec 03, 2015 at 04:25:49AM +1300, Bryan Christianson wrote:
> 
> Try "chronyc makestep" when the clock is well synchronized and see if
> the measured offset doesn't jump. Maybe on OS X it's not a problem,
> but at least on one system I think I saw a larger error.

This looks OK to me - just small deviations.

number9:~ root# chronyc makestep
200 OK
number9:~ root# chronyc makestep
200 OK
number9:~ root# chronyc makestep
200 OK
number9:~ root# chronyc makestep
200 OK
number9:~ root# chronyc makestep
200 OK
number9:~ root# 

And in syslog we see
Dec  3 04:57:48 number9 chronyd[9156]: System clock was stepped by -0.000008 seconds
Dec  3 04:58:16 number9 chronyd[9156]: System clock was stepped by 0.000007 seconds
Dec  3 04:58:27 number9 chronyd[9156]: System clock was stepped by -0.000004 seconds
Dec  3 04:58:46 number9 chronyd[9156]: System clock was stepped by 0.000014 seconds
Dec  3 04:58:49 number9 chronyd[9156]: System clock was stepped by -0.000005 seconds


> 
>>> As for the settimeofday() update interval, I think that should
>>> correspond to the precision of how the kernel sets and reads the
>>> RTC. If it just reads seconds and doesn't wait for the interrupt
>>> (assuming it's not some special RTC with a sub-second counter), the
>>> update interval could be probably much longer than 15 minutes.
>> 
>> The default Energy Saver setting on OS X is to put the machine to sleep after 10 minutes of inactivity. If the SYNC_RTC_INTERVAL update interval is too high then the clock would never be updated. 
> 
> I'm not sure I follow here.

If we were to use a periodic timer, it should fire before the system hibernates, which by default is after 10 minutes of inactivity.

> 
>> If we set the timer to fire at, for example, 60 second intervals we would then only do the sync if more than 1 hour has elapsed since the last update and the offset is less than 1 second. No point updating the clock if its wildly off.
> 
> Is a timer needed for this? Couldn't be the RTC update a part of
> set_sync_status() for instance?

Yes - that would work

-- 
Bryan Christianson
bryan@xxxxxxxxxxxxx




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


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/