-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Tue, 05 May 2015 15:51:12 +0200 "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2015-05-05 05:45, Andrei Borzenkov wrote:
В Tue, 5 May 2015 02:31:32 +0200 (CEST) "Carlos E. R." <> пишет:
How does it cope with suspend/hibernate? (with ntp I stop and restart it via automatic pm script)
ntp seems to work across suspend/resume fine here (on 13.2). I do not see anything that would restart it, nor is it restarted (just checked).
It does work, yes. But not fully well. Basically it is not aware that hibernation happened, and does nothing special. For instance, on thawing, the clock, which is set directly from the bios battery backed clock, maybe even minutes wrong. The clock needs to be jumped, but that is something that ntpd will never do when it is already running,
That's incorrect. ntpd will slew time if offset is below threshold (128ms by default) and jump if offset is more.
as it assumes that the clock is already absolutely in sync and it is against it philosophy (of doing very small adjustments by changing the clock speed to catch up over a long time).
The other issue is that I'm using servers from the pool, and these come and go. If I thaw the computer the next day, or the next week, these may have disappeared or point to a different IP.
Well ... 5 May 06:12:54 ntpd[372]: Listen normally on 8 wlan0 192.168.1.46 UDP 123 5 May 06:12:54 ntpd[372]: peers refreshed 5 May 06:12:54 ntpd[372]: new interface(s) found: waking up resolver 5 May 06:50:04 ntpd[372]: Deleting interface #8 wlan0, 192.168.1.46#123, interface stats: received=51, sent=51, dropped=0, active_time=2229 secs 5 May 06:50:04 ntpd[372]: 91.122.42.73 interface 192.168.1.46 -> (none) 5 May 06:50:04 ntpd[372]: 78.140.251.2 interface 192.168.1.46 -> (none) 5 May 06:50:04 ntpd[372]: 79.165.187.13 interface 192.168.1.46 -> (none) 5 May 06:50:04 ntpd[372]: peers refreshed 5 May 17:52:28 ntpd[372]: Listen normally on 9 wlan0 192.168.1.46 UDP 123 5 May 17:52:28 ntpd[372]: peers refreshed 5 May 17:52:28 ntpd[372]: new interface(s) found: waking up resolver So it apparently does notice that network changes across suspend and tries to adjust.
Thus it required to restart the daemon so that learns about the new peer addresses, and jumps the time as much as needed. No, this is not automatic: I added a script to do this.
That peers may disappear is really unrelated to suspend. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVI8GEACgkQR6LMutpd94xEUACfbNX/09AZARXkROkPHbRPNVlK mxMAnRk/zyq/iJjSgMW0APUNYgj5AAwr =3ZkL -----END PGP SIGNATURE-----