Re: [chrony-dev] Wake from sleep on OS X |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] Wake from sleep on OS X
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Thu, 3 Dec 2015 05:12:56 +1300
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0-2; h=Feedback-ID:X-Smtpcorp-Track:To:Message-Id:Date: From:Subject; bh=6MsVw4oD5tSukbVHFcI4OvSbWiKuwmzh/7eUCLFORU4=; b=LXhVd70P48CG /b2VPI1vq8yBpZGlBN5S2Tah5UgxE5LdgYXyyWRKWx4BV1bnUcPxiWd0cLGYqgM3ubfREWTNh+RMe Ni/xTHheIwn0xUjKGfPt4515TSWKxd7pT8VQ3lZnySq3IScGm+khw+TV4lxbtoL9iK5WWtp3x/PXT mqo2esZ+NFrCWoU4oVzYGAjE94djBXr2+XjaTcXvbzqi6YC2HXbKPkVQTOGVYF7dm6oKf+WBJYEw+ 3Ly6MS0U75UMfdOGGB2kwE0bv6vQrF+LbhszGKjsESFYpvt/JnQM4w60cwa3nuAdMo180scf+fYzK fzFYQbFaAwBYfU1y81TDig==;
- Feedback-id: 149811m:149811acx33YQ:149811sT3zs2fOqZ:SMTPCORP
> 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.