PROPHET/OS
NAME
ptp: the offset to the time master, and which clock took the stamp
SYNOPSIS
ptp [--tui]
DESCRIPTION
The offset to the time master, and which clock took the stamp.
clock beside this one shows the clocks of **this** machine and how far they drifted apart. This one shows the time **between** machines, which is what a camera, a lidar and an IMU need before their pictures can be fused: without a common clock there is no sensor fusion, and ntpv reaches milliseconds where microseconds are wanted.
Four timestamps carry the whole protocol (IEEE 1588-2008, 11.3). t1 is when the master sent its Sync, t2 when we received it, t3 when we sent our Delay_Req and t4 when the master received that. Out of them come the two numbers under the table:
delay = ((t2 - t1) + (t4 - t3)) / 2 offset = ((t2 - t1) - (t4 - t3)) / 2
The division by two is the one assumption of the protocol: the wire is as long in both directions. A positive offset means our clock runs ahead of the master's.
**source is the row to read first, and the picture says it again.** card means the stamp was written by the card at the wire, which is what the whole protocol is for. software means the driver read the clock of this machine when it copied the frame out: the number is then off by the way through the interrupt, the queue and the copy, which is a thousand times the number itself.
window is the second half of that answer, and the two can disagree. absent means the card does not carry the IEEE 1588 registers at all, and then silent names the one that did not answer, so the line reads "this card ignores TIMINCA" and not "no hardware". answers with source: software is the more interesting case and the one this machine shows: every register of the window takes a write and gives it back, the clock runs, and the valid bit that would say "a stamp lies ready" never comes up. A card can look able and stamp nothing, and only the pair of rows says so.
steps is 1 when the master sends its own send time in the Sync and 2 when it follows with a Follow_Up, which is what a master with a stamping card does. discarded counts messages that arrived and could not be used: a wrong version, another domain, or a Delay_Resp that answered somebody else.
**The best master election (BMCA) is not held.** This side is a slave and takes the first master it hears; an Announce is counted and not acted on. A second master on the same wire is a second source of time, and choosing between them is a decision and not a formula.
The rows come out of /state/ptp, which the net service writes. Without the net there is no page, and then this says one line and ends with 1 instead of showing a table of no rows.
--tui takes the whole screen and keeps the rows live; the arrows and the two page keys move, q leaves.
EXAMPLE
$ ptp --help ptp [--tui] the offset to the time master, and which clock stamped --tui live on the whole screen, q leaves