Hi Chris, Thanks a lot for your email. Very good point. So to complete the explanation.
The system (Server) MUST be synced with NTP with a given timeserver. Directly attached to the Server is a PTP Device: --- ethtool -T ens2f1 Time stamping parameters for ens2f1: Capabilities: hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE) software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE) hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE) software-receive (SOF_TIMESTAMPING_RX_SOFTWARE) software-system-clock (SOF_TIMESTAMPING_SOFTWARE) hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE) PTP Hardware Clock: 1 Hardware Transmit Timestamp Modes: off (HWTSTAMP_TX_OFF) on (HWTSTAMP_TX_ON) Hardware Receive Filter Modes: none (HWTSTAMP_FILTER_NONE) ptpv1-l4-event (HWTSTAMP_FILTER_PTP_V1_L4_EVENT) ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT) ptpv2-l2-event (HWTSTAMP_FILTER_PTP_V2_L2_EVENT) --- So the hardware clock (which I meant) is the server HW clock, this must be leaved untouched and continue to sync with the given time server. What I need now is way to directly get the time from the PTP (hardware or NIC attached to it) or even better the Difference between the server clock and the PTP clock. Maybe this is already what it displayed with --- pmc -u -b 0 'GET TIME_STATUS_NP' sending: GET TIME_STATUS_NP 98f2b3.fffe.138691-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP master_offset 30302 ingress_time 1589900176102021422 cumulativeScaledRateOffset +0.000000000 scaledLastGmPhaseChange 0 gmTimeBaseIndicator 0 lastGmPhaseChange 0x0000'0000000000000000.0000 gmPresent true gmIdentity 0080ea.fffe.bd9a70 --- and maybe what I look for is the "master_offset", but thats where I am unsure. the entry in /etc/ptp4l.conf is now "free_running 1" and the ntpd of the server is syncing with the "must" timeserver. Is there a way to easily get the difference somewhere (and maybe as a bonus the obviously more correct ptp time). Sorry for my dumb questions but I am not a ptp expert - I only need this time(difference). And yes - I also don't understand why they don't sync to PTP, especially when there is (I assume expensive) hardware attached. Thanks a lot for your help regards Werner On Tue, May 19, 2020 at 4:36 PM Chris Caudle <ch...@chriscaudle.org> wrote: > I am replying from the digest, I apologize if the message threading is > broken from that. > ... > > And compare ingress_time to the timestamp I get when I use the local > > hardware clock (which I am not allowed to sync with ptp). > ... > > For now all I need is the exact difference between what PTP would deliver > > compared to the local systemtime. > > You should make sure what exactly you are not permitted to sync with ptp. > Is it really hardware clock, or do you mean system clock and RTC? > In PTP context when you use the term "hardware clock" I think most would > assume that means the PTP Hardware Clock (PHC) in the network controller. > To most system administrators the term "hardware clock" would probably > imply the system clock maintained by the operating system using processor > counters, and synchronized to the realtime clock (RTC) on shutdown, and > possibly periodically while running. > > As far as I am aware the PHC in the NIC is not used for anything other > than network time synchronization using PTP, and the PHC has no relation > to the system clock unless you also run phc2sys to transfer time from the > PHC to the system (software) clock. > > So in summary it would be worth checking that you and whoever made the > restriction of not changing the hardware clock are really speaking of the > same thing, because a reasonable interpretation could be that you can sync > the NIC hardware clock using PTP, but just don't touch the system clock > running from the processor counter. > > -- > Chris Caudle > > > > > > > _______________________________________________ > Linuxptp-users mailing list > Linuxptp-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-users >
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users