2017-06-28 11:31 GMT+02:00 Richard Cochran <richardcoch...@gmail.com>: > On Thu, Jun 22, 2017 at 09:18:34AM +0200, Boris Boucher wrote: >> I also swear that I may also have a problem during system startup, if the >> serveur is started before the master clock, it may >> start to broadcast a time with the wrong UTC offset until the GM is ready. > > Be sure to check the value of currentUtcOffsetValid. If zero, then > the offset should be ignored. > >> Richard, I understand that the daemon should write the received offset on a >> persistant storage on use it on startup, regardless >> of the actual time zone or hardcoded info ? Is it a difficult modification >> to implement in the daemon ? > > No, it doesn't make sense to automatically store the offset. Why? > Because when the program starts again, there is no guarantee that one > or more new leap seconds have occurred, and there is no way to know, > except via the network.
I agree that on startup, we have no guarantee that no leap second was added or removed since the last shutdown. But, in a global system that is powered up, the GPS helped master clock will take some some time to start, eventually more time than my SERVER machine. In between the SERVER will assume grand master role and start broadcast the wrong time (because its utc offset knowledge is old). So, on one hand, we face the risk of having an offset error each time the system is started, on the other hand, we have e very little change of starting up the system just after a leap second update and have the wrong time until the GPS helped master clock is available. >From my point of view, having a risk of temporary false time after each startup is more problematic. > > Having said that, if you can verify the offset before starting ptp4l, > then you can provide it via the utc_offset configuration file option > or the --utc_offset=x command line switch. > Happy to know about this option. This may be the solution in my case to start the daemon with the correct offset each time. Much better than having to update the offset afterward with the pmc command while the daemon is already broadcasting a bad offset. I while try this ASAP. By the way, this configuration option seams not to be documented (never seen it before). I just looked in the source code to retrieve it. But I didn't see it as a command line switch in the code. I will check that at work tomorow. Thank you very much, Boris. > Thanks, > Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users