Discussion:
[Linuxptp-devel] PMC Managment ID documentation
Chris LaRocque
2017-05-02 15:24:27 UTC
Permalink
Hello

I am running timemaster on my device and now want to know which master I am
synchronized to; ntp, ptp, or if neither service is available / reachable.

My first thought was to use pmc but I think that it only gives me
information about my local ptp clock. In any case I'd like to read the
definitions and descriptions for the various management ids.

Other than strolling through the pmc and ptp4l source, is there a
definitive document and if so where can I locate it?

Thank You

Chris LaRocque.
Richard Cochran
2017-05-03 09:31:32 UTC
Permalink
Post by Chris LaRocque
Other than strolling through the pmc and ptp4l source, is there a
definitive document and if so where can I locate it?
They are not documented anywhere in our project materials (BTW they
are documented in IEEE 1588), but you can simply run pmc
interactively, trying the "help" command first. Then, try each
command in turn. That will give you the sample outputs.

Below, I include some notes, not really explained, but maybe better
than nothing...

HTH,
Richard


* CURRENT_DATA_SET
stepsRemoved 0
offsetFromMaster 0.0
meanPathDelay 0.0

* PARENT_DATA_SET
# find out the GM identity
parentPortIdentity e89a8f.fffe.74f796-0
parentStats 0
observedParentOffsetScaledLogVariance 0xffff
observedParentClockPhaseChangeRate 0x7fffffff
grandmasterPriority1 128
gm.ClockClass 248
gm.ClockAccuracy 0xfe
gm.OffsetScaledLogVariance 0xffff
grandmasterPriority2 128
grandmasterIdentity e89a8f.fffe.74f796

* TIME_PROPERTIES_DATA_SET
# find out whether time is globally traceable
currentUtcOffset 35
leap61 0
leap59 0
currentUtcOffsetValid 0
ptpTimescale 0
timeTraceable 0
frequencyTraceable 0
timeSource 0xa0

* PORT_DATA_SET
# knowing the portState can be useful, SLAVE and MASTER
portIdentity e89a8f.fffe.74f796-1
portState FAULTY
logMinDelayReqInterval 0
peerMeanPathDelay 0
logAnnounceInterval 1
announceReceiptTimeout 3
logSyncInterval 0
delayMechanism 1
logMinPdelayReqInterval 0
versionNumber 2

* GRANDMASTER_SETTINGS_NP
# values used when nodes becomes the GM
# SET action useful for GPS time server
clockClass 248
clockAccuracy 0xfe
offsetScaledLogVariance 0xffff
currentUtcOffset 35
leap61 0
leap59 0
currentUtcOffsetValid 0
ptpTimescale 0
timeTraceable 0
frequencyTraceable 0
timeSource 0xa0

* DEFAULT_DATA_SET
# discover the numberPorts
twoStepFlag 1
slaveOnly 0
numberPorts 1
priority1 128
clockClass 248
clockAccuracy 0xfe
offsetScaledLogVariance 0xffff
priority2 128
clockIdentity e89a8f.fffe.74f796
domainNumber 0

* avb
* TIME_STATUS_NP
# designed for use with gPTP and free_running
master_offset 0
ingress_time 0
cumulativeScaledRateOffset +0.000000000
scaledLastGmPhaseChange 0
gmTimeBaseIndicator 0
lastGmPhaseChange 0x0000'0000000000000000.0000
gmPresent false
gmIdentity e89a8f.fffe.74f796

* PORT_DATA_SET_NP
# gPTP: SET neighborPropDelayThresh and GET asCapable
neighborPropDelayThresh 20000000
asCapable 0
Chris LaRocque
2017-05-03 10:40:40 UTC
Permalink
Thank you Richard

I had already gone through all of the IDs but had not cross referenced the
properties with the configuration parameters.

Is there an immediate way to tell which source, ntp vs PTP is being used by
phc2sys to discipline the system clock?

Regards

Chris

Pushing back the boundaries of ignorance.
Post by Richard Cochran
Post by Chris LaRocque
Other than strolling through the pmc and ptp4l source, is there a
definitive document and if so where can I locate it?
They are not documented anywhere in our project materials (BTW they
are documented in IEEE 1588), but you can simply run pmc
interactively, trying the "help" command first. Then, try each
command in turn. That will give you the sample outputs.
Below, I include some notes, not really explained, but maybe better
than nothing...
HTH,
Richard
* CURRENT_DATA_SET
stepsRemoved 0
offsetFromMaster 0.0
meanPathDelay 0.0
* PARENT_DATA_SET
# find out the GM identity
parentPortIdentity e89a8f.fffe.74f796-0
parentStats 0
observedParentOffsetScaledLogVariance 0xffff
observedParentClockPhaseChangeRate 0x7fffffff
grandmasterPriority1 128
gm.ClockClass 248
gm.ClockAccuracy 0xfe
gm.OffsetScaledLogVariance 0xffff
grandmasterPriority2 128
grandmasterIdentity e89a8f.fffe.74f796
* TIME_PROPERTIES_DATA_SET
# find out whether time is globally traceable
currentUtcOffset 35
leap61 0
leap59 0
currentUtcOffsetValid 0
ptpTimescale 0
timeTraceable 0
frequencyTraceable 0
timeSource 0xa0
* PORT_DATA_SET
# knowing the portState can be useful, SLAVE and MASTER
portIdentity e89a8f.fffe.74f796-1
portState FAULTY
logMinDelayReqInterval 0
peerMeanPathDelay 0
logAnnounceInterval 1
announceReceiptTimeout 3
logSyncInterval 0
delayMechanism 1
logMinPdelayReqInterval 0
versionNumber 2
* GRANDMASTER_SETTINGS_NP
# values used when nodes becomes the GM
# SET action useful for GPS time server
clockClass 248
clockAccuracy 0xfe
offsetScaledLogVariance 0xffff
currentUtcOffset 35
leap61 0
leap59 0
currentUtcOffsetValid 0
ptpTimescale 0
timeTraceable 0
frequencyTraceable 0
timeSource 0xa0
* DEFAULT_DATA_SET
# discover the numberPorts
twoStepFlag 1
slaveOnly 0
numberPorts 1
priority1 128
clockClass 248
clockAccuracy 0xfe
offsetScaledLogVariance 0xffff
priority2 128
clockIdentity e89a8f.fffe.74f796
domainNumber 0
* avb
* TIME_STATUS_NP
# designed for use with gPTP and free_running
master_offset 0
ingress_time 0
cumulativeScaledRateOffset +0.000000000
scaledLastGmPhaseChange 0
gmTimeBaseIndicator 0
lastGmPhaseChange 0x0000'0000000000000000.0000
gmPresent false
gmIdentity e89a8f.fffe.74f796
* PORT_DATA_SET_NP
# gPTP: SET neighborPropDelayThresh and GET asCapable
neighborPropDelayThresh 20000000
asCapable 0
Richard Cochran
2017-05-03 10:59:22 UTC
Permalink
Post by Chris LaRocque
Is there an immediate way to tell which source, ntp vs PTP is being used by
phc2sys to discipline the system clock?
Apart from monitoring the log messages, no, I don't think so.

Sorry,
Richard

Richard Cochran
2017-05-03 09:34:39 UTC
Permalink
Post by Chris LaRocque
Other than strolling through the pmc and ptp4l source, is there a
definitive document and if so where can I locate it?
Also, most of the items (like slaveOnly for example) are exactly the
same properties as in the configuration file, so you can consult the
ptp4l man page.

Thanks,
Richard
Loading...