Miroslav,

Thanks for the real-time response. I am a little confused so let me state what 
I know and you can ya/na it.

Got an email from Jake Keller earlier that was very helpful with regards to 
'phc2sys'. Jake stated when 'phc2sys -a' has the '-a' option and the 
GrandMaster fails then PTP network configuration will select a new GrandMaster 
automatically which I've verified in a real system configuration.

        "If you run ptp4l on all your systems, and each one also running 
phc2sys, it will:

        on system which is "master"

                phc2sys will drive the ptp4l hw clock based on local time

                ptp4l will sync time out the network using PTP

        on systems which are not master

                ptp4l will sync time in from network to hw clock

                phc2sys will sync hw clock to CLOCK_REALTIME.

        But if you want to also use NTP as a clock source, then you need to use 
timemaster, as otherwise phc2sys and ntpd will interfere with each other."

So when NTP is to be the clock source (and vice versa)  then 'timermaster' is 
needed because phc2sys and ntpd will interfere with one another. Now the 
problem is GrandMaster failure, if I understand you correctly when another PTP 
system on the network becomes the GrandMater 'timemaster' will NOT 
automatically reconfigure and start using NTP as the clock source (using 
timemaster to start PTP configuration on all systems on the PTP network)?

If this is the case then one would have to have another application running in 
the background to detect the switch, create the appropriate 'timemaster' 
configuration file and start?

Thanks,
Harold


-----Original Message-----
From: Miroslav Lichvar [mailto:mlich...@redhat.com] 
Sent: Monday, August 17, 2015 9:52 AM
To: Harold Lapprich <hlappr...@pixel-velocity.com>
Cc: Keller, Jacob E <jacob.e.kel...@intel.com>; 
linuxptp-users@lists.sourceforge.net
Subject: Re: [Linuxptp-users] Grandmaster Auto-Negotiation and Reconfiguration 
of phc2sys to ptp4l Synchronization

On Mon, Aug 17, 2015 at 01:27:01PM +0000, Harold Lapprich wrote:
> So let me see if I understand you correctly, if the system of say 6 devices 
> on a local network are all started with 'timemaster' and the GrandMaster is 
> removed (i.e., the device has to be serviced or fails) then 'timemaster' in 
> the background will detect this and restart everything and the device that 
> becomes the GrandMaster will begin providing clock updates to NTP or 
> receiving clock correction from NTP?

No, timemaster is currently PTP slave only. It starts ptp4l with the slaveOnly 
option, so it can't become a master. With current phc2sys it wouldn't work 
anyway. It would need to be modified to switch between two servos, NTP SHM when 
the PTP clock is synchronized and a real servo when the system clock is the 
source.

> In the network configuration I am looking at creating each system will be 
> capable of being the NTP server (ntpd demon can be started) and then using 
> 'timemaster' to create the end-to-end configuration for precise timing.

As the linuxptp code currently stands, I think you will need to keep 
ptp4l/phc2sys in control of the system clock and configure ntpd/chronyd to just 
serve the local time with the LOCAL driver/local stratum option with no other 
time sources listed in the config.

For example:
ptp4l -i eth0
phc2sys -a -r -r
chronyd 'local stratum 1' 'allow'

--
Miroslav Lichvar

------------------------------------------------------------------------------
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to