ptpd2 statistics with negative values

Anonymous
2012-02-14
2012-11-23
  • Anonymous - 2012-02-14

    RE: PTP Slave E2E mode using Hybrid mode

    Hi,

    Any idea why the ptpd2 statistics are wrong: /usr/sbin/ptpd2 -g -U -i 0 -h -d -L -t -D -C

    # Timestamp, State, Clock ID, One Way Delay, Offset From Master, Slave to Master, Master to Slave, Drift, Last packet Received
    2012-02-14 15:51:32.276122, init
       (ptpd info)     15:51:32.410992  (init)  refreshed IGMP multicast memberships
       (ptpd info)     15:51:32.411017  (init)    now in state PTP_LISTENING
    2012-02-14 15:51:32.411046, lstn_init 1
       (ptpd info)     15:51:33.871042  (lstn_init)    now in state PTP_SLAVE
    2012-02-14 15:51:33.871066, slv ec4670fffe0007a5(unknown)/01,  0.000000000,  0.000000000,  0.000000000,  0.000000000, 0, I
       (ptpd notice)   15:51:34.871073  (slv)  Received first Sync from Master
       (ptpd notice)   15:51:34.871092  (slv)     going to arm DelayReq timer for the first time, with initial rate: 0
    2012-02-14 15:51:34.871366, slv ec4670fffe0007a5(unknown)/01,  0.000000000, -0.000151075,  0.000000000, -0.000302150, -151, S
    2012-02-14 15:51:35.814478, slv ec4670fffe0007a5(unknown)/01,  0.000061053, -0.000151075,  0.000546365, -0.000302150, -151, D
       (ptpd notice)   15:51:35.814502  (slv)    received first DelayResp from Master
       (ptpd notice)   15:51:35.814516  (slv)    received new DelayReq frequency 1 from Master (was: 0)
    2012-02-14 15:51:35.870988, slv ec4670fffe0007a5(unknown)/01,  0.000061053, -0.000332996,  0.000546365, -0.000302790, -483, S
    2012-02-14 15:51:36.871141, slv ec4670fffe0007a5(unknown)/01,  0.000061053, -0.000364202,  0.000546365, -0.000303510, -847, S
    2012-02-14 15:51:37.501501, slv ec4670fffe0007a5(unknown)/01,  0.000090884, -0.000364202,  0.000542165, -0.000303510, -847, D
    2012-02-14 15:51:37.871430, slv ec4670fffe0007a5(unknown)/01,  0.000090884, -0.000379098,  0.000542165, -0.000302750, -1226, S
    2012-02-14 15:51:38.871260, slv ec4670fffe0007a5(unknown)/01,  0.000090884, -0.000394254,  0.000542165, -0.000303990, -1620, S
    2012-02-14 15:51:39.871276, slv ec4670fffe0007a5(unknown)/01,  0.000090884, -0.000394554,  0.000542165, -0.000303350, -2014, S
    2012-02-14 15:51:40.871891, slv ec4670fffe0007a5(unknown)/01,  0.000090884, -0.000394334,  0.000542165, -0.000303550, -2408, S
    2012-02-14 15:51:41.189470, slv ec4670fffe0007a5(unknown)/01,  0.000100226, -0.000394334,  0.000540545, -0.000303550, -2408, D
    2012-02-14 15:51:41.871366, slv ec4670fffe0007a5(unknown)/01,  0.000100226, -0.000399245,  0.000540545, -0.000303830, -2807, S
    2012-02-14 15:51:42.871365, slv ec4670fffe0007a5(unknown)/01,  0.000100226, -0.000403956,  0.000540545, -0.000303630, -3210, S
    2012-02-14 15:51:43.871978, slv ec4670fffe0007a5(unknown)/01,  0.000100226, -0.000402876,  0.000540545, -0.000301670, -3612, S
    2012-02-14 15:51:44.314410, slv ec4670fffe0007a5(unknown)/01,  0.000105278, -0.000402876,  0.000546425, -0.000301670, -3612, D
    2012-02-14 15:51:44.871352, slv ec4670fffe0007a5(unknown)/01,  0.000105278, -0.000405622,  0.000546425, -0.000304070, -4017, S
    2012-02-14 15:51:45.871477, slv ec4670fffe0007a5(unknown)/01,  0.000105278, -0.000404628,  0.000546425, -0.000294630, -4421, S
    2012-02-14 15:51:46.872175, slv ec4670fffe0007a5(unknown)/01,  0.000105278, -0.000404828,  0.000546425, -0.000304470, -4825, S
    2012-02-14 15:51:47.001742, slv ec4670fffe0007a5(unknown)/01,  0.000108336, -0.000404828,  0.000542005, -0.000304470, -4825, D
    2012-02-14 15:51:47.871533, slv ec4670fffe0007a5(unknown)/01,  0.000108336, -0.000411677,  0.000542005, -0.000305270, -5236, S
    2012-02-14 15:51:48.871648, slv ec4670fffe0007a5(unknown)/01,  0.000108336, -0.000413406,  0.000542005, -0.000304870, -5649, S
    2012-02-14 15:51:49.872025, slv ec4670fffe0007a5(unknown)/01,  0.000108336, -0.000413066,  0.000542005, -0.000304590, -6062, S
    2012-02-14 15:51:50.251582, slv ec4670fffe0007a5(unknown)/01,  0.000110138, -0.000413066,  0.000543665, -0.000304590, -6062, D
    2012-02-14 15:51:50.871677, slv ec4670fffe0007a5(unknown)/01,  0.000110138, -0.000414107,  0.000543665, -0.000305150, -6476, S
    2012-02-14 15:51:51.001687, slv ec4670fffe0007a5(unknown)/01,  0.000111384, -0.000414107,  0.000541525, -0.000305150, -6476, D
    2012-02-14 15:51:51.872451, slv ec4670fffe0007a5(unknown)/01,  0.000111384, -0.000416091,  0.000541525, -0.000305510, -6892, S
    2012-02-14 15:51:51.876414, slv ec4670fffe0007a5(unknown)/01,  0.000112251, -0.000416091,  0.000542425, -0.000305510, -6892, D
    2012-02-14 15:51:52.872155, slv ec4670fffe0007a5(unknown)/01,  0.000112251, -0.000417087,  0.000542425, -0.000305030, -7309, S
    2012-02-14 15:51:53.871919, slv ec4670fffe0007a5(unknown)/01,  0.000112251, -0.000417680,  0.000542425, -0.000305830, -7726, S
    2012-02-14 15:51:54.251805, slv ec4670fffe0007a5(unknown)/01,  0.000112911, -0.000417680,  0.000541725, -0.000305830, -7726, D
    2012-02-14 15:51:54.871802, slv ec4670fffe0007a5(unknown)/01,  0.000112911, -0.000418130,  0.000541725, -0.000305270, -8144, S
    2012-02-14 15:51:55.872357, slv ec4670fffe0007a5(unknown)/01,  0.000112911, -0.000418120,  0.000541725, -0.000305150, -8562, S
    2012-02-14 15:51:56.064796, slv ec4670fffe0007a5(unknown)/01,  0.000113452, -0.000418120,  0.000542605, -0.000305150, -8562, D
    2012-02-14 15:51:56.872106, slv ec4670fffe0007a5(unknown)/01,  0.000113452, -0.000417411,  0.000542605, -0.000303310, -8979, S
    2012-02-14 15:51:57.189692, slv ec4670fffe0007a5(unknown)/01,  0.000114143, -0.000417411,  0.000550105, -0.000303310, -8979, D
    2012-02-14 15:51:57.871948, slv ec4670fffe0007a5(unknown)/01,  0.000114143, -0.000418447,  0.000550105, -0.000305990, -9397, S
    2012-02-14 15:51:58.872521, slv ec4670fffe0007a5(unknown)/01,  0.000114143, -0.000419992,  0.000550105, -0.000305710, -9816, S
    2012-02-14 15:51:58.939758, slv ec4670fffe0007a5(unknown)/01,  0.000114821, -0.000419992,  0.000548085, -0.000305710, -9816, D
    2012-02-14 15:51:59.872215, slv ec4670fffe0007a5(unknown)/01,  0.000114821, -0.000420071,  0.000548085, -0.000305470, -10236, S
    2012-02-14 15:52:00.872164, slv ec4670fffe0007a5(unknown)/01,  0.000114821, -0.000420730,  0.000548085, -0.000306350, -10656, S
    2012-02-14 15:52:01.872639, slv ec4670fffe0007a5(unknown)/01,  0.000114821, -0.000421350,  0.000548085, -0.000306710, -11077, S
    2012-02-14 15:52:02.064695, slv ec4670fffe0007a5(unknown)/01,  0.000115187, -0.000421350,  0.000542705, -0.000306710, -11077, D
    2012-02-14 15:52:02.872185, slv ec4670fffe0007a5(unknown)/01,  0.000115187, -0.000421453,  0.000542705, -0.000306190, -11498, S
    2012-02-14 15:52:03.872599, slv ec4670fffe0007a5(unknown)/01,  0.000115187, -0.000421556,  0.000542705, -0.000306550, -11919, S
    2012-02-14 15:52:04.873134, slv ec4670fffe0007a5(unknown)/01,  0.000115187, -0.000421936,  0.000542705, -0.000306950, -12340, S
    2012-02-14 15:52:05.872382, slv ec4670fffe0007a5(unknown)/01,  0.000115187, -0.000421916,  0.000542705, -0.000306510, -12761, S
    2012-02-14 15:52:06.001514, slv ec4670fffe0007a5(unknown)/01,  0.000115360, -0.000421916,  0.000541005, -0.000306510, -12761, D
    2012-02-14 15:52:06.564715, slv ec4670fffe0007a5(unknown)/01,  0.000115537, -0.000421916,  0.000544145, -0.000306510, -12761, D
    2012-02-14 15:52:06.872475, slv ec4670fffe0007a5(unknown)/01,  0.000115537, -0.000421931,  0.000544145, -0.000306630, -13182, S
    2012-02-14 15:52:07.872863, slv ec4670fffe0007a5(unknown)/01,  0.000115537, -0.000421826,  0.000544145, -0.000305950, -13603, S
    2012-02-14 15:52:08.872587, slv ec4670fffe0007a5(unknown)/01,  0.000115537, -0.000422006,  0.000544145, -0.000306990, -14025, S
    2012-02-14 15:52:09.872588, slv ec4670fffe0007a5(unknown)/01,  0.000115537, -0.000422926,  0.000544145, -0.000307790, -14447, S
    2012-02-14 15:52:10.439565, slv ec4670fffe0007a5(unknown)/01,  0.000115715, -0.000422926,  0.000543785, -0.000307790, -14447, D
    2012-02-14 15:52:10.872924, slv ec4670fffe0007a5(unknown)/01,  0.000115715, -0.000423095,  0.000543785, -0.000307150, -14870, S
    2012-02-14 15:52:11.872741, slv ec4670fffe0007a5(unknown)/01,  0.000115715, -0.000422784,  0.000543785, -0.000306990, -15292, S
    2012-02-14 15:52:12.872770, slv ec4670fffe0007a5(unknown)/01,  0.000115715, -0.000422324,  0.000543785, -0.000306230, -15714, S
    2012-02-14 15:52:13.251636, slv ec4670fffe0007a5(unknown)/01,  0.000115877, -0.000422324,  0.000544145, -0.000306230, -15714, D
    2012-02-14 15:52:13.439724, slv ec4670fffe0007a5(unknown)/01,  0.000116070, -0.000422324,  0.000545765, -0.000306230, -15714, D
    2012-02-14 15:52:13.626755, slv ec4670fffe0007a5(unknown)/01,  0.000116247, -0.000422324,  0.000544465, -0.000306230, -15714, D
    2012-02-14 15:52:13.873002, slv ec4670fffe0007a5(unknown)/01,  0.000116247, -0.000422630,  0.000544465, -0.000307070, -16136, S
    2012-02-14 15:52:13.939762, slv ec4670fffe0007a5(unknown)/01,  0.000116418, -0.000422630,  0.000547605, -0.000307070, -16136, D
    2012-02-14 15:52:14.872687, slv ec4670fffe0007a5(unknown)/01,  0.000116418, -0.000425042,  0.000547605, -0.000310350, -16561, S
    2012-02-14 15:52:15.001585, slv ec4670fffe0007a5(unknown)/01,  0.000116581, -0.000425042,  0.000549245, -0.000310350, -16561, D
    2012-02-14 15:52:15.872742, slv ec4670fffe0007a5(unknown)/01,  0.000116581, -0.000425169,  0.000549245, -0.000306990, -16986, S
    2012-02-14 15:52:16.873308, slv ec4670fffe0007a5(unknown)/01,  0.000116581, -0.000423090,  0.000549245, -0.000306030, -17409, S
    2012-02-14 15:52:17.872998, slv ec4670fffe0007a5(unknown)/01,  0.000116581, -0.000423430,  0.000549245, -0.000307670, -17832, S
    2012-02-14 15:52:18.064594, slv ec4670fffe0007a5(unknown)/01,  0.000116695, -0.000423430,  0.000545285, -0.000307670, -17832, D
    2012-02-14 15:52:18.872925, slv ec4670fffe0007a5(unknown)/01,  0.000116695, -0.000424387,  0.000545285, -0.000307830, -18256, S
    2012-02-14 15:52:19.873354, slv ec4670fffe0007a5(unknown)/01,  0.000116695, -0.000423864,  0.000545285, -0.000306510, -18679, S
    2012-02-14 15:52:20.873123, slv ec4670fffe0007a5(unknown)/01,  0.000116695, -0.000422184,  0.000545285, -0.000304470, -19101, S
    2012-02-14 15:52:21.126897, slv ec4670fffe0007a5(unknown)/01,  0.000116826, -0.000422184,  0.000545745, -0.000304470, -19101, D
    2012-02-14 15:52:21.873005, slv ec4670fffe0007a5(unknown)/01,  0.000116826, -0.000423150,  0.000545745, -0.000308310, -19524, S
    2012-02-14 15:52:22.873523, slv ec4670fffe0007a5(unknown)/01,  0.000116826, -0.000424856,  0.000545745, -0.000307750, -19948, S
    2012-02-14 15:52:23.873183, slv ec4670fffe0007a5(unknown)/01,  0.000116826, -0.000425056,  0.000545745, -0.000308710, -20373, S
    2012-02-14 15:52:24.751691, slv ec4670fffe0007a5(unknown)/01,  0.000116959, -0.000425056,  0.000547545, -0.000308710, -20373, D
    2012-02-14 15:52:24.873152, slv ec4670fffe0007a5(unknown)/01,  0.000116959, -0.000426002,  0.000547545, -0.000309510, -20799, S
    2012-02-14 15:52:25.873608, slv ec4670fffe0007a5(unknown)/01,  0.000116959, -0.000426528,  0.000547545, -0.000309630, -21225, S
    2012-02-14 15:52:26.873578, slv ec4670fffe0007a5(unknown)/01,  0.000116959, -0.000424048,  0.000547545, -0.000304550, -21649, S
    2012-02-14 15:52:27.873411, slv ec4670fffe0007a5(unknown)/01,  0.000116959, -0.000422788,  0.000547545, -0.000307110, -22071, S
    2012-02-14 15:52:28.564730, slv ec4670fffe0007a5(unknown)/01,  0.000117107, -0.000422788,  0.000551025, -0.000307110, -22071, D
    2012-02-14 15:52:28.873643, slv ec4670fffe0007a5(unknown)/01,  0.000117107, -0.000425162,  0.000551025, -0.000309150, -22496, S
    2012-02-14 15:52:29.189724, slv ec4670fffe0007a5(unknown)/01,  0.000117273, -0.000425162,  0.000551045, -0.000309150, -22496, D
    2012-02-14 15:52:29.251714, slv ec4670fffe0007a5(unknown)/01,  0.000117365, -0.000425162,  0.000546405, -0.000309150, -22496, D
    2012-02-14 15:52:29.873544, slv ec4670fffe0007a5(unknown)/01,  0.000117365, -0.000426725,  0.000546405, -0.000309830, -22922, S

    Issues:

    Offset from Master : This looks about right as it's on the same switch (Not IEEE15888 compliant)
    Slave to Master: Seems a bit high and should not be negative (rtt min/avg/max/mdev = 0.428/0.477/0.502/0.030 ms)
    Master to Slave: Seems a bit high (rtt min/avg/max/mdev = 0.428/0.477/0.502/0.030 ms)
    Drift: Why is this always negative?

    Any help would be appreciated.

     
  • George Neville-Neil

    You are not guaranteed to have symmetric round trip time so using ping to measure this will not be completely accurate.  Also, you might check a few things, like whether or not your NIC has adaptive interrupt moderation.  That needs to be off.

     
  • Anonymous - 2012-02-16

    Hi George,

    Thanks for your response.
    Are the Drift Figures shown in the statistics in nanoseconds? And why are they all negative. I would have expected it to fluctuate between positive and negative values. Drift should be the value of our system time away from the computed Master Clock time.

     
  • Anonymous - 2012-02-22

    How is Drift calculated?

     
  • George Neville-Neil

    The drift is calculated when we update the clock.  It is based on the offset from master but is adjusted with the variable ai.  If you look at servo.c in the function updateClock() you will see where it is set.  The reason the drift is negative is because your offset from the master is negative.  The key thing to look for is that after a few minutes all these values settle down and that they don't vary too much.  If you have a quiet network on which you're running PTPd then the values shouldn't vary too much.  Of course your computer's clock crystal is always going to be pushing the clock either faster or slower and PTPd is apply pressure in one direction or another to keep it as close as possible to the master so the numbers will never (or at least it's highly unlikely that they'll ever) be constant.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks