Menu

2.3.1 Slave Not Updating Time

Help
Jeff Crow
2015-07-07
2015-07-09
  • Jeff Crow

    Jeff Crow - 2015-07-07

    I have two CentOS 6.5 systems running ptp 2.3.1. The slave system does not update the system time, despite apparently syncing with the master and acquiring clock control. I installed ptpd by building RPMs using the rpmbuild.sh script, and changed the following options from their defaults in the config file:

    ptpengine:interface=eth2
    ptpengine:use_libpcap=y
    ptpengine:panic_mode=n
    clock:set_rtc_on_step=y
    

    Below is the log file from the slave:

    2015-07-07 11:01:04.476820 ptpd2[3821].startup (info)      (___)   Info:    Now running as a daemon
    2015-07-07 11:01:04.476965 ptpd2[3821].startup (info)      (___) Successfully acquired lock on /var/run/ptpd2.lock
    2015-07-07 11:01:04.477067 ptpd2[3821].startup (notice)    (___) PTPDv2 started successfully on eth2 using "slaveonly" preset (PID 3821)
    2015-07-07 11:01:04.477091 ptpd2[3821].startup (info)      (___) TimingService.PTP0: PTP service init
    2015-07-07 11:01:04.513011 ptpd2[3821].eth2 (info)      (init) Observed drift loaded from /etc/ptpd2_kernelclock.drift: 0 ppb
    2015-07-07 11:01:04.619252 ptpd2[3821].eth2 (notice)    (lstn_init) Now in state: PTP_LISTENING
    2015-07-07 11:01:04.672423 ptpd2[3821].eth2 (info)      (lstn_init) New best master selected: 002590fffe6a2750(unknown)/1
    2015-07-07 11:01:04.672462 ptpd2[3821].eth2 (notice)    (slv) Now in state: PTP_SLAVE, Best master: 002590fffe6a2750(unknown)/1 (IPv4:172.16.0.2)
    2015-07-07 11:01:05.672273 ptpd2[3821].eth2 (notice)    (slv) Received first Sync from Master
    2015-07-07 11:01:06.679318 ptpd2[3821].eth2 (notice)    (slv) Received first Delay Response from Master
    2015-07-07 11:01:09.682649 ptpd2[3821].eth2 (notice)    (slv) Offset computation now calibrated
    2015-07-07 11:01:14.478189 ptpd2[3821].eth2 (notice)    (slv) TimingService.PTP0: elected best TimingService
    2015-07-07 11:01:14.478223 ptpd2[3821].eth2 (info)      (slv) TimingService.PTP0: acquired clock control
    

    Thanks,
    Jeff

     
  • Wojciech Owczarek

    Hi,

    How do you know it's not updating the system time? When you run the slave with -V, are you getting statistics? What is the status file showing - /var/run/ptpd2.status?

     
  • Jeff Crow

    Jeff Crow - 2015-07-07

    Hi,

    The two machines are about 3 seconds apart, so I can see the clock offset easily. Neither is running ntpd.

    The statistics I'm getting are apparently all zeros:

    2015-07-07 12:41:14.729172, slv, 002590fffe6a2750(unknown)/1,  0.000000000,  0.000000000,  0.000000000,  0.000000000, 0.000000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0,  0.000000000,  0.000000000
    

    Below are the contents of /var/run/ptpd2.status:

    Host info          :  artemis, PID 5399
    Local time         :  Tue Jul 07 12:47:43 CDT 2015
    Kernel time        :  Tue Jul 07 17:47:43 GMT 2015
    Interface          :  eth2
    Preset             :  slaveonly
    Transport          :  ipv4 + libpcap, multicast
    Delay mechanism    :  E2E
    Sync mode          :  TWO_STEP
    PTP domain         :  0
    Port state         :  PTP_SLAVE
    Local port ID      :  002590fffe6a2838(unknown)/1
    Best master ID     :  002590fffe6a2750(unknown)/1
    Best master IP     :  172.16.0.2
    GM priority        :  Priority1 128, Priority2 128, clockClass 13
    Time properties    :  ARB timescale, tracbl: time N, freq N, src: INTERNAL_OSCILLATOR(0xa0)
    UTC properties     :  UTC valid: N, UTC offset: 0
    Offset from Master :  0.000000000 s, mean  0.000000000 s, dev  0.000000000 s
    Mean Path Delay    :  0.000000000 s, mean  0.000000000 s, dev  0.000000000 s
    Clock status       :  calibrated, in control
    Clock correction   :  0.000 ppm, mean  0.000 ppm, dev  0.000 ppm
    Message rates      :  1/s sync, 1/s delay, 1/2s announce
    TimingService      :  current PTP0, best PTP0, pref PTP0
    TimingServices     :  total 1, avail 1, oper 1, idle 0, in_ctrl 1
    Performance        :  Message RX 3/s, TX 0/s
    Announce received  :  42
    Sync received      :  83
    Follow-up received :  0
    DelayReq sent      :  75
    DelayResp received :  75
    State transitions  :  3
    PTP Engine resets  :  1
    

    Thanks,
    Jeff

     
  • Wojciech Owczarek

    Slave is showing zero follow-up messages received. It's receiving sync but not follow-up, without this it cannot compute the offset. What is the master showing, is it sending followUp? Is firewall disabled on both? What about tcpdump/tshark, how does the traffic look like? What's the master config - can you enable libpcap and see if it makes a difference? Finally, what's the NIC type and driver and what does "ethtool -T <ethX>" show?

     
  • Jeff Crow

    Jeff Crow - 2015-07-08

    I ran WireShark on an external system, and I see the PTPv2 follow-up messages going across the wire. Source is the master port 320, destination is 224.0.1.129 port 320.

    The NIC is an Intel Pro/1000, using the e1000e driver.

    ethtool -T output is:

    Time stamping parameters for eth2:
    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: 0
    Hardware Transmit Timestamp Modes:
        off                   (HWTSTAMP_TX_OFF)
        on                    (HWTSTAMP_TX_ON)
    Hardware Receive Filter Modes:
        none                  (HWTSTAMP_FILTER_NONE)
        all                   (HWTSTAMP_FILTER_ALL)
        ptpv1-l4-sync         (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
        ptpv1-l4-delay-req    (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
        ptpv2-l4-sync         (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
        ptpv2-l4-delay-req    (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
        ptpv2-l2-sync         (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
        ptpv2-l2-delay-req    (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
        ptpv2-event           (HWTSTAMP_FILTER_PTP_V2_EVENT)
        ptpv2-sync            (HWTSTAMP_FILTER_PTP_V2_SYNC)
        ptpv2-delay-req       (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
    

    Thanks for you help!
    Jeff

     
  • Wojciech Owczarek

    The remaining questions are:

    • Is firewall disabled on both?
    • You can see follow-up, but on which end - on both?
    • can you enable libpcap and see if it makes a difference? you will need libpcap-devel and a rebuild

    Please send ptpd a SIGUSR2 and check the logs - it should dump all counters, check for errors.

    Thanks,
    Wojciech

     
  • Jeff Crow

    Jeff Crow - 2015-07-09

    Thanks for you help, it's working now! I had disabled the firewall on the master, but apparently not on the slave. Completely disabling iptables and turning on pcap in ptpd2 seems to have been the magic combination.

     
  • Wojciech Owczarek

    Hi - good to hear it worked - however it should still work without libpcap. Can you confirm?

     

Log in to post a comment.