6.7 PTP Monitoring
The Precision Time Protocol (PTP) is a protocol used to synchronize clocks throughout a computer network.PTP achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems.PTP allows users to view most recent history of offset from master, mean path delay and skew values through CLI command and optionally generate syslogs. To generate syslogs, users must configure threshold values for each metric, and whenever the switch sees an unusual data, it generates a syslog.
By default recording and displaying recent history is enabled. To view available data use show tech-support command. But by default syslog is disabled, and user must configure in order to generate syslog.
6.7.1 Configuring PTP Monitoring
The following PTP configurations are supported on all PTP supported device.
Use ptp monitor command to enable or disable PTP monitoring on the device. The PTP monitor is enabled by default. The no form of the command disables the PTP monitoring and clears all the recorded data.
Example
Switch(config)#[no] ptp monitor
 
Use ptp monitor threshold offset-from-master command to configure the value of the offset from master threshold in nanoseconds. Syslog is generated if the most recently calculated offset from master is not in the range (-<threshold>, <threshold>). Max offset threshold is one second. The no form of the command clears all the offset value set for master threshold.
Example
Switch(config)#[no] ptp monitor threshold offset-from-master
               <threshold>
 
Use ptp monitor threshold mean-path-delay command to configure the value of the mean path delay threshold in nanoseconds. Syslog is generated if the value of the most recently calculated mean path delay is greater than or equal to this threshold. Max threshold is one second. The no form of the command clears all the threshold value set.
Note Mean path delay is always non-negative.
Example
Switch(config)#[no] ptp monitor threshold mean-path-delay <threshold>
 
Use ptp monitor threshold skew command to configures the value of the skew threshold percentage. Syslog is generated if the value of the most recently calculated skew is not in the range (1/(1+<threshold>), 1*(1+<threshold>)). Skew threshold value is a double precision (16 digit) real number ranging from 0 to 10 (100%). The no form of the command clears all the skew value set.
Example
Switch(config)#[no] ptp monitor threshold skew <threshold>
 
6.7.2 Displaying PTP Monitoring Information
Use show ptp monitor command to display the list of up to 100 recorded entries of offset from master, mean path delay and skew values, along with current PTP mode, whether or not the feature is enabled, number of entries displayed and the configured thresholds for each metric. Entries are sorted by the system time at when the value has been calculated, starting from the most recent data at the top.
Example
Switch# show ptp monitor
PTP Mode: Boundary Clock
Ptp monitoring: enabled
Number of entries: 5
Offset from master threshold: 1500
Mean path delay threshold: not configured
Skew threshold: 0.5
Interface  Time                          Offset from   Mean Path    Skew
                                         Master (ns)   Delay (ns)
---------- ----------------------------- ------------ ------------- -----------
Et8        21:23:12.901 UTC Feb 22 2018  71            5849         1.003159918
Et1        21:23:12.901 UTC Feb 22 2018  113           3672         1.004990621
Et2        21:23:12.901 UTC Feb 22 2018  706           7799         1.002744199
Et1        21:23:12.901 UTC Feb 22 2018  803           5861         1.003432049
Et1        21:23:12.901 UTC Feb 22 2018  610           3415         0.998974658