How can I tell that the slave is Synchronized to the master?

Synchronized can mean different things to different persons. Synchronized could mean that the slave is exchanging PTP messages with the master and the slave is controlling it's clock to minimize it's offset to the master. Or Synchronized could mean that the slave's estimated offset to the master is within a certain limit.

How to check that a device is a slave to a master.
First, check the status of the device port:

A:/root> ptp2 p s 
A:/root> Port state: PTP2_STATE_SLAVE
	

For devices with two PTP ports (M68, M88):

A:/root> ptp2 p 1 s
A:/root> Port state: PTP2_STATE_SLAVE
A:/root> ptp2 p 2 s
A:/root> Port state: PTP2_STATE_MASTER
	

Check who's the master and compare the reported Clock ID with the MAC address of the intended master:

A:/root> ptp2 d m
A:/root> *** Parent data set ***
{  
 Parent port identity:   Clock identity: FC AF 6A FF FE 0 B AF  
 Port number: 1 
 Parent stats: FALSE 
 Observed parent offset scaled log variance: 65535 
 Observed parent clock phase change rate: 2147483647 
 Grandmaster identity: FC AF 6A FF FE 0 B AF 
 Grandmaster clock quality: 
  Clock class: 6  
  Clock accuracy: 0x21 
  Offset scaled log variance: 65535 
 Grandmaster priority 1: 128 
 Grandmaster priority 2: 128 
}
	

Finally, you can check the slave's estimated offset from the master:

A:/root> ptp2 d c 
A:/root> *** Current Data set *** 
{ 
 Steps removed: 1 
 Offset from master: sec: 0 nsec: 000000106 
 Mean path delay: sec: 0 nsec: 000010867 
}
	

For the second interpretation of "synchronized", that the slave's estimated offset to the master is within a certain limit, we keep a parameter that is set to "synchronized" when certain conditions including the estimated offset being less than 1000 ns apply. This parameter can be monitored by the Loopcontrol debug command:

A:/root> ptp2 e d on 
A:/root> Debug output is turned ON 
A:/root> ptp2 e v 15 
. 
. 
. 
LOOPCONTROL: Sync: minimum timestamp difference: 10773.0 (ns), variation 15.6, 10 values,  0 outliers. 
LOOPCONTROL: Delay request: minimum timestamp difference: 10907.0 (ns), variation 18.9, 11 values, 0 outliers. 
LOOPCONTROL: error -67 ns, variation 18.865 ns, delay 10840, slope -1.7031, variation 2.0325, not synchronized
Local clock is now synchronized: 
  average offset < 1000 ns, average drift = -34.6 ns/s 
LOOPCONTROL: Update clock drift: -35.695 ns/s 
LOOPCONTROL: Sync: minimum timestamp difference: 10800.0 (ns), variation 1.1, 11 values, 0 outliers. 
LOOPCONTROL: Delay request: minimum timestamp difference: 10907.0 (ns), variation 15.6, 11 values, 0 outliers. 
LOOPCONTROL: error -53.5 ns, variation 15.617 ns, delay 10854, slope -3.1779, variation 1.6098, synchronized 
LOOPCONTROL: Update clock drift: -35.912 ns/s
	

Another way of monitoring the parameter is using the "time information" command, which will tell you if you're listening to a PTP master (Clock sync state) and if the conditions for setting the parameter to synchronized is true (Clock synchronized).

A:/root> ptp2 t i 
A:/root> *** Time information *** 
{ 
 Clock sync state: SYNCHRONIZING 
 Clock synchronized: NO 
 Time source: PTP 
 Timescale: PTP 
 ARB time: sec: 1460120839 nsec: 257189564 
 PTP time: 2016-04-08 13:07:19.257189564 
 UTC offset: +36 sec 
 UTC time: 2016-04-08 13:06:43 
 Leap59 flag: 0 
 Leap61 flag: 0 
 RTC time: 2016-04-08 14:06:43 GMT (DST) 
 RTC update: ON 
 Holdover interval: 1000 s 
} 
Local clock is now synchronized: 
  average offset < 1000 ns, average drift = -4295.8 ns/s 
ptp2 t i 
A:/root> *** Time information *** 
{ 
 Clock sync state: SYNCHRONIZING 
 Clock synchronized: YES 
 Time source: PTP 
 Timescale: PTP 
 ARB time: sec: 1460121419 nsec: 221080420 
 PTP time: 2016-04-08 13:16:59.221080420 
 UTC offset: +36 sec  UTC time: 2016-04-08 13:16:23 
 Leap59 flag: 0 
 Leap61 flag: 0 
 RTC time: 2016-04-08 14:16:23 GMT (DST) 
 RTC update: ON 
 Holdover interval: 1000 s 
}
	

Still need help? Contact Us Contact Us