Discussion:
[Linuxptp-users] linuxptp Manual - How it works exactly
Mozhdeh Kamel
2013-04-14 16:22:16 UTC
Permalink
Hi everybody :)

I am trying to understand how to work with linuxptp. As there is no manual
for it, it made me confuse d. I wish there was a finite state that explain
the relation between different parts.

According to what I understood, to use ptplinux,
we need to have system requirements (linux kernel support, proper
NIC(MAC+PHY)). The whole process works with these commands :
ptp4l, pmc, phc2sys, hwstamp_ctl

Can you please give me one line definition of each command? I know the
options, and what we can get from with <command -h>.

Here is another question, how we can define which is master and which is
slave. I have seen
-p [dev] in ptp4l
-c [dev|name] in phc2sys
-d [dev] in phc2sys
-s [dev|name] in phc2sys

which refers to PTP hardware clock device, master and slave. So, What
exactly means by PTP hardware device? do we need a special clocks beside
the NIC?

Sorry for so many questions, I hope you help me. I have started reading all
the discussion in user forum to understand but it made me more confused.



BR,
Mozhdeh
Richard Cochran
2013-04-15 16:35:05 UTC
Permalink
Post by Mozhdeh Kamel
According to what I understood, to use ptplinux,
we need to have system requirements (linux kernel support, proper
ptp4l, pmc, phc2sys, hwstamp_ctl
Can you please give me one line definition of each command? I know the
options, and what we can get from with <command -h>.
ptp4l - This is the main program, implementing PTP as a BC or OC.

phc2sys - Utility program to synchronize the normal Linux system time
to a PTP Hardware Clock.

pmc - This is a utility program for sending PTP management queries.

hwstamp_ctl - just a test program for the SIOCSHWTSTAMP ioctl.
Post by Mozhdeh Kamel
Here is another question, how we can define which is master and which is
slave. I have seen
-p [dev] in ptp4l
-c [dev|name] in phc2sys
-d [dev] in phc2sys
-s [dev|name] in phc2sys
which refers to PTP hardware clock device, master and slave. So, What
exactly means by PTP hardware device? do we need a special clocks beside
the NIC?
For the ptp4l, the 'slave' and 'master' roles are determined for each
port automatically using the BMC.

For phc2sys, the terms 'slave' and 'master' are not about the PTP, but
rather about two local clocks. Usually, the Linux system time is the
slave, and the PHC is the master.
Post by Mozhdeh Kamel
Sorry for so many questions, I hope you help me. I have started reading all
the discussion in user forum to understand but it made me more confused.
We probably really do need to write a users manual, but it is hard to
find the time to do so.

HTH,
Richard

Loading...