[chrony-dev] chronyd feature request: aggressive mode
chronyd does a good job of keeping the time in sync without big changes in the drift (freuquency). But there are a few situations, where an “aggressive mode” (i.e. drastically increasing the frequency) would be more appropriate: (1) at start (2) when there is a big time-error (ntp-time - cpu-time) (e.g. > 2 sec) (3) (at least on macOS) when the computer wakes up from sleep. (1) my computer usually runs for months without shut-down or reboot. So maybe chronyd already does the right thing in this situation. (2) I have seen rather big frequencies (up to 20-fold of normal drift resulting from a time-error of 45 sec). So this case also seems to be handled ok. (3) On macOS there is usually a time-error of -1 … +2 seconds upon wake up. (rarely more than 2 sec) (this is only true with rtcsync working). The problem here: when chronyd thinks that all is stable, the next check with ntp might by delayed by up to 17 min (sometime up to 53 min). And for usual errors < 2 sec, case (2) does not apply. This results in almost an hour (depending of course on the wake-up error) until the time is correct again. Here I would like to see an “aggressive mode” until the time-error is down to a few msec. Would this be possible? Or are there reasons, why this is *not* a good idea? Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
[chrony-dev] rtcsync in chrony 3.5
I have some suspicion that rtcsync does no longer work in 3.5. set_sync_status has these lines: /* update the RTC by applying a step of 0.0 secs */ apply_step_offset(0.0); last_rtc_sync = now; DEBUG_LOG("rtc synchronised”; So: maybe I should turn on some debug flags (how? - I am rather clueless) and look at some log-file (where?) Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
[chrony-dev] chronyd 3.5 on macOS
macOS seems to have two clocks: • a hardware clock, which always runs (even if the device is switched off) • and a software clock, which is used by all apps. When the device starts (or awakes from sleep) the software clock is set from the hardware clock. The problem: adjtime (or whatever chronyd uses to keep the software clock synced with ntp) does *not* update the hardware clock. The only way to set the hardware clock I know of is settimeofday. Assuming a computer where the hardware clock drifts with 17.36 ppm (= 1.5 sec / d. After a month, after each wake-up the time will be 45 sec off; which then takes chronyd 3 or more hours to set correctly. Workaround: • have a launch daemon, which, whenever the system is going to sleep, does gettimeofday + settimeofday. Would it be possible that chronyd does this? Alternative: just do settimeofday periodically (e.g. every 15 minutes or so). Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
[chrony-dev] Wild frequency fluctuations in macOS 13.2
chronyd 3.2, macOS 13.2. The usual frequency of my computer is 18 … 19 ppm (roughly depending on time of day). Starting chronyd I see wild changes in frequency from 15 to 75 ppm for more than 6 h before it finally settles down to a reasonable value. The period of these fluctuations is about 15 minutes, e.g.: 2017-12-08 22:42:51 +21.220 2017-12-08 22:47:10 +73.421 2017-12-08 22:57:57 +33.983 A full tracking.log is available upon request (but probably too large for a mailing list). This is something I have never seen with chronyd 2.3 / macOS 12.x. What can I do? Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-dev] macOS 13: suspicious jumps while sleeping
> On 22 Nov 2017, at 15:42, Bryan Christianson <br...@whatroute.net> wrote: > >> On 22/11/2017, at 9:15 PM, Miroslav Lichvar <mlich...@redhat.com> wrote: >> >> On Wed, Nov 22, 2017 at 02:03:17PM +0700, Gerriet M. Denkmann wrote: >>> macOS 13.1, chrony 3.2. >>> >>> I modified check_current_time() in sched.c: >>> LOG(LOGS_WARN, "Forward time jump detected! %4ld sec”, raw->tv_sec - >>> (prev_raw->tv_sec + elapsed_max.tv_sec) ); >>> >>> After the computer has been sleeping for some time (since about 10:10), I >>> saw: >> >> The computer has woken up only once and there are multiple messages >> saying the clock jumped forward? That is weird. Any chance the new >> timed daemon is interfering with the clock? There was a post on the >> -users list how it can be disabled. > > This looks like the 'timed' problem. Here is what I posted to the users list. > > There is a bug in High Sierra (macOS 10.13) that leaves Apple's timed daemon > active after it has been disabled in the System Settings 'Date and Time' > preferences > > timed continues to send NTP packets to the server specified in the System > Preferences and then adjusts the system clock. This of course has a terrible > effect on chronyd, with frequency and offsets jumping all over the place. > > I have reported the bug to Apple so hopefully it will be fixed in some > forthcoming patch release of macOS 10.13 I wrote a small program to see what my MacBook is doing when it thinks that no-one is looking (e.g. when the lid is closed). Here is the output with comments and lines from chrony added: First the poor MacBook has terrible problems falling asleep: repeatedly sleeping for less than 3 seconds and waking again for 45 seconds: 2017-11-22 18:59:33.314973 -[AppDelegate receiveSleepNote:]: awakefor 106.3 sec; start sleep 2017-11-22 18:59:35.468490 -[AppDelegate receiveWakeNote:]: sleeping for 2.2 sec; now awake 2017-11-22 19:00:20.474175 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:00:23.001654 -[AppDelegate receiveWakeNote:]: sleeping for 2.5 sec; now awake 2017-11-22 19:01:08.000719 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:01:10.553012 -[AppDelegate receiveWakeNote:]: sleeping for 2.6 sec; now awake 2017-11-22 19:01:55.557896 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:01:58.086610 -[AppDelegate receiveWakeNote:]: sleeping for 2.5 sec; now awake 2017-11-22 19:02:43.089206 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:02:45.639407 -[AppDelegate receiveWakeNote:]: sleeping for 2.6 sec; now awake 2017-11-22 19:03:30.644818 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:03:33.196194 -[AppDelegate receiveWakeNote:]: sleeping for 2.6 sec; now awake 2017-11-22 19:04:18.201862 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:04:20.747223 -[AppDelegate receiveWakeNote:]: sleeping for 2.5 sec; now awake 2017-11-22 19:05:05.750811 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:05:08.296899 -[AppDelegate receiveWakeNote:]: sleeping for 2.5 sec; now awake 2017-11-22 19:05:53.302906 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep 2017-11-22 19:05:55.841995 -[AppDelegate receiveWakeNote:]: sleeping for 2.5 sec; now awake 2017-11-22 19:06:40.846943 -[AppDelegate receiveSleepNote:]: awakefor 45.0 sec; start sleep But even when it finally manages to sleep it will from time to time become active (while still asleep) and stay active for about 40 seconds: On each of these occasions chrony will see a jump comparable to the time spend inactive. All of this happens when it is supposed to be asleep. 2017-11-22 19:36:59.183870 -[AppDelegate applicationDidFinishLaunching:]_block_invoke sleeping active since Wed Nov 22 18:57:25 2017 for 570.0 sec 2017-11-22 19:36:59.184052 -[AppDelegate applicationDidFinishLaunching:]_block_invoke sleeping inactive for 1803.2 sec default 19:36:59.679124 +0700 chronyd Forward time jump detected! 1794 sec 2017-11-22 19:46:12.739923 -[AppDelegate applicationDidFinishLaunching:]_block_invoke sleeping active since Wed Nov 22 19:36:59 2017 for40.0 sec 2017-11-22 19:46:12.740084 -[AppDelegate applicationDidFinishLaunching:]_block_invoke sleeping inactive for 513.6 sec default 19:46:37.786756 +0700 chronyd Forward time jump detected! 504 sec 2017-11-22 20:11:19.325330 -[AppDelegate applicationDidFinishLaunching:]_block_invoke sleeping active since Wed Nov 22 19:46:12 2017 for40
Re: [chrony-dev] Building chrony 3.2 on macOS 13.1
> On 22 Nov 2017, at 14:57, Miroslav Lichvar <mlich...@redhat.com> wrote: > > On Wed, Nov 22, 2017 at 01:49:50PM +0700, Gerriet M. Denkmann wrote: >> The sub-makes (like make docs) do not work if the make filename >> (“/Volumes/x.12 + >> เม่น/Applications/Xcode.app/Contents/Developer/usr/bin/make” in my case) >> contains any spaces. >> >> Changing all occurrences of : $(MAKE) to: ‘$(MAKE)’ in >> chrony-3.2/Makefile.in seems to fix this problem. > > You mean ‘make' using the apostrophe character (ASCII 0x27)? Yes. Unicode APOSTROPHE = 0x27. > I have never seen commands in a Makefile quoted like that. As I > understand it, make generally does not support filenames with spaces. I am not very experienced with Makefiles; but I think all Unix stuff supports spaces; although sometimes some additional efforts (like quoting) are required. Using APOSTROPHEs may well not be the correct way to do this - but it works (with GNU Make 3.81) and I do not know of any better way of quoting. Kind regards, Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
[chrony-dev] Building chrony 3.2 on macOS 13.1
The sub-makes (like make docs) do not work if the make filename (“/Volumes/x.12 + เม่น/Applications/Xcode.app/Contents/Developer/usr/bin/make” in my case) contains any spaces. Changing all occurrences of : $(MAKE) to: ‘$(MAKE)’ in chrony-3.2/Makefile.in seems to fix this problem. Kind regards, Gerriet. -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.