Brian Olson
2017-06-13 00:01:32 UTC
I just started using linuxptp version 1.8, so this may be a misunderstanding on my part. Iâm seeing slightly better performance from phc2sys using -E linreg. The problem is that when I reboot, it seems to semi-stabilize at an offset near -2 seconds. If I restart only phc2sys without changing anything else, it works properly. Here are some logs from a reboot, I added some spaces to align columns a bit better.
if I drop the -E linreg (using PI loop) I donât have this issue. Any thoughts? Iâm using "-a -r -N 25 -E linreg"
I added some extra logs in clockadj.c to log ticks and freq, I can include those if it would be helpful.
2017-06-12T19:00:17.551561-04:00 bco2 phc2sys: [25.183] failed to adjust the clock: Invalid argument
2017-06-12T19:00:18.551709-04:00 bco2 phc2sys: [26.183] reconfiguring after port state change
2017-06-12T19:00:18.551721-04:00 bco2 phc2sys: [26.183] selecting CLOCK_REALTIME for synchronization
2017-06-12T19:00:18.551726-04:00 bco2 phc2sys: [26.183] selecting eth2 as the master clock
2017-06-12T19:00:18.551790-04:00 bco2 phc2sys: [26.183] phc offset 196930623 s0 freq +1000000000 delay 51
2017-06-12T19:00:19.551917-04:00 bco2 phc2sys: [27.183] phc offset 196905268 s0 freq +1000000000 delay 56
2017-06-12T19:00:20.552050-04:00 bco2 phc2sys: [28.183] phc offset 196880154 s0 freq +1000000000 delay 57
2017-06-12T19:00:21.355353-04:00 bco2 phc2sys: [29.183] phc offset 196855592 s1 freq +100000000 delay 1713
2017-06-12T19:00:22.355485-04:00 bco2 phc2sys: [30.183] phc offset -111043198 s2 freq +100000000 delay 1539
2017-06-12T19:00:23.355900-04:00 bco2 phc2sys: [31.184] phc offset -222219586 s2 freq +100000000 delay 41
2017-06-12T19:00:24.356082-04:00 bco2 phc2sys: [32.184] phc offset -333383570 s2 freq +100000000 delay 41
2017-06-12T19:00:25.356227-04:00 bco2 phc2sys: [33.184] phc offset -444540013 s2 freq +100000000 delay 44
2017-06-12T19:00:26.356366-04:00 bco2 phc2sys: [34.184] phc offset -555693635 s2 freq +100000000 delay 44
2017-06-12T19:00:27.356490-04:00 bco2 phc2sys: [35.184] phc offset -666847284 s2 freq +100000000 delay 57
2017-06-12T19:00:28.356649-04:00 bco2 phc2sys: [36.185] phc offset -777999637 s2 freq +100000000 delay 40
2017-06-12T19:00:29.356792-04:00 bco2 phc2sys: [37.185] phc offset -889157226 s2 freq +100000000 delay 40
2017-06-12T19:00:30.356914-04:00 bco2 phc2sys: [38.185] phc offset -1000312121 s2 freq +100000000 delay 43
2017-06-12T19:00:31.357051-04:00 bco2 phc2sys: [39.185] phc offset -1111463984 s2 freq +100000000 delay 86
2017-06-12T19:00:32.357145-04:00 bco2 phc2sys: [40.185] phc offset -1222616536 s2 freq +100000000 delay 43
2017-06-12T19:00:33.357248-04:00 bco2 phc2sys: [41.185] phc offset -1333765929 s2 freq +100000000 delay 1437
2017-06-12T19:00:34.357387-04:00 bco2 phc2sys: [42.185] phc offset -1444922024 s2 freq +100000000 delay 46
2017-06-12T19:00:35.357542-04:00 bco2 phc2sys: [43.186] phc offset -1556079842 s2 freq +100000000 delay 42
2017-06-12T19:00:36.357656-04:00 bco2 phc2sys: [44.186] phc offset -1667230540 s2 freq +100000000 delay 43
2017-06-12T19:00:37.357787-04:00 bco2 phc2sys: [45.186] phc offset -1778384396 s2 freq +100000000 delay 53
2017-06-12T19:00:38.357918-04:00 bco2 phc2sys: [46.186] phc offset -1889538277 s2 freq +100000000 delay 47
2017-06-12T19:00:39.358041-04:00 bco2 phc2sys: [47.186] phc offset -2000692669 s2 freq +100000000 delay 1453
2017-06-12T19:00:40.358152-04:00 bco2 phc2sys: [48.186] phc offset -2111845429 s2 freq -560981 delay 1423
2017-06-12T19:00:41.358303-04:00 bco2 phc2sys: [49.186] phc offset -2111300380 s2 freq -55880536 delay 60
2017-06-12T19:00:42.358492-04:00 bco2 phc2sys: [50.186] phc offset -2058356966 s2 freq -84947498 delay 59
2017-06-12T19:00:43.358696-04:00 bco2 phc2sys: [51.187] phc offset -1980071281 s2 freq -45492825 delay 67
2017-06-12T19:00:44.358855-04:00 bco2 phc2sys: [52.187] phc offset -1936565859 s2 freq +2726509 delay 52
2017-06-12T19:00:45.359001-04:00 bco2 phc2sys: [53.187] phc offset -1939296933 s2 freq +40481207 delay 44
2017-06-12T19:00:46.359123-04:00 bco2 phc2sys: [54.187] phc offset -1981527504 s2 freq +41084104 delay 44
2017-06-12T19:00:47.359241-04:00 bco2 phc2sys: [55.187] phc offset -2024402721 s2 freq +18263875 delay 46
2017-06-12T19:00:48.359646-04:00 bco2 phc2sys: [56.188] phc offset -2043022503 s2 freq -12112771 delay 1583
2017-06-12T19:00:49.359906-04:00 bco2 phc2sys: [57.188] phc offset -2031094619 s2 freq -27456863 delay 1603
2017-06-12T19:00:50.360091-04:00 bco2 phc2sys: [58.188] phc offset -2004393943 s2 freq -23399703 delay 66
2017-06-12T19:00:51.360270-04:00 bco2 phc2sys: [59.188] phc offset -1981550186 s2 freq -6106846 delay 1618
2017-06-12T19:00:52.360476-04:00 bco2 phc2sys: [60.188] phc offset -1975497514 s2 freq +10251086 delay 1619
2017-06-12T19:00:53.360673-04:00 bco2 phc2sys: [61.189] phc offset -1985894666 s2 freq +16477922 delay 1579
2017-06-12T19:00:54.360804-04:00 bco2 phc2sys: [62.189] phc offset -2002672476 s2 freq +11093292 delay 1571
2017-06-12T19:00:55.360962-04:00 bco2 phc2sys: [63.189] phc offset -2013916914 s2 freq +238342 delay 55
2017-06-12T19:00:56.361093-04:00 bco2 phc2sys: [64.189] phc offset -2014185661 s2 freq -8292577 delay 64
2017-06-12T19:00:57.361281-04:00 bco2 phc2sys: [65.189] phc offset -2005985697 s2 freq -9802301 delay 62
2017-06-12T19:00:58.361439-04:00 bco2 phc2sys: [66.189] phc offset -1996302200 s2 freq -5083480 delay 59
2017-06-12T19:00:59.361597-04:00 bco2 phc2sys: [67.190] phc offset -1991269736 s2 freq +1539388 delay 47
2017-06-12T19:01:00.361742-04:00 bco2 phc2sys: [68.190] phc offset -1992833854 s2 freq +5604798 delay 44
2017-06-12T19:01:01.361894-04:00 bco2 phc2sys: [69.190] phc offset -1998496667 s2 freq +5273009 delay 43
2017-06-12T19:01:02.362030-04:00 bco2 phc2sys: [70.190] phc offset -2003823803 s2 freq +1804365 delay 57
2017-06-12T19:01:03.362182-04:00 bco2 phc2sys: [71.190] phc offset -2005655728 s2 freq -1923388 delay 43
2017-06-12T19:01:04.362316-04:00 bco2 phc2sys: [72.190] phc offset -2003759785 s2 freq -3644365 delay 58
2017-06-12T19:01:05.362472-04:00 bco2 phc2sys: [73.190] phc offset -2000152641 s2 freq -2772461 delay 48
2017-06-12T19:01:06.362607-04:00 bco2 phc2sys: [74.191] phc offset -1997412732 s2 freq -437308 delay 46
2017-06-12T19:01:07.362772-04:00 bco2 phc2sys: [75.191] phc offset -1996999757 s2 freq +1583367 delay 47
2017-06-12T19:01:08.362912-04:00 bco2 phc2sys: [76.191] phc offset -1998611717 s2 freq +2131027 delay 56
2017-06-12T19:01:09.363056-04:00 bco2 phc2sys: [77.191] phc offset -2000772602 s2 freq +1247206 delay 57
2017-06-12T19:01:10.363209-04:00 bco2 phc2sys: [78.191] phc offset -2002046815 s2 freq -183359 delay 56
2017-06-12T19:01:11.363356-04:00 bco2 phc2sys: [79.191] phc offset -2001887859 s2 freq -1176955 delay 45
2017-06-12T19:01:12.363488-04:00 bco2 phc2sys: [80.191] phc offset -2000737109 s2 freq -1243613 delay 59
2017-06-12T19:01:13.363617-04:00 bco2 phc2sys: [81.192] phc offset -1999519966 s2 freq -577278 delay 130
2017-06-12T19:01:14.363742-04:00 bco2 phc2sys: [82.192] phc offset -1998967780 s2 freq +291828 delay 50
2017-06-12T19:01:15.363866-04:00 bco2 phc2sys: [83.192] phc offset -1999285374 s2 freq +732762 delay 48
2017-06-12T19:01:16.363991-04:00 bco2 phc2sys: [84.192] phc offset -2000043233 s2 freq +605879 delay 46
2017-06-12T19:01:17.364129-04:00 bco2 phc2sys: [85.192] phc offset -2000674819 s2 freq +145709 delay 50
2017-06-12T19:01:18.364266-04:00 bco2 phc2sys: [86.192] phc offset -2000845943 s2 freq -312543 delay 58
2017-06-12T19:01:19.364412-04:00 bco2 phc2sys: [87.192] phc offset -2000558636 s2 freq -478808 delay 48
2017-06-12T19:01:20.364576-04:00 bco2 phc2sys: [88.193] phc offset -2000104053 s2 freq -323273 delay 1598
2017-06-12T19:01:21.364749-04:00 bco2 phc2sys: [89.193] phc offset -1999806420 s2 freq -10156 delay 1597
2017-06-12T19:01:22.364908-04:00 bco2 phc2sys: [90.193] phc offset -1999822277 s2 freq +198055 delay 45
2017-06-12T19:01:23.365082-04:00 bco2 phc2sys: [91.193] phc offset -2000044565 s2 freq +240083 delay 1599
2017-06-12T19:01:24.365228-04:00 bco2 phc2sys: [92.193] phc offset -2000310301 s2 freq +112863 delay 1598
2017-06-12T19:01:25.365388-04:00 bco2 phc2sys: [93.193] phc offset -2000449082 s2 freq -102722 delay 47
2017-06-12T19:01:26.365761-04:00 bco2 phc2sys: [94.194] phc offset -2000370876 s2 freq -80148 delay 1596
2017-06-12T19:01:27.366142-04:00 bco2 phc2sys: [95.194] phc offset -2000316912 s2 freq +7256 delay 63
2017-06-12T19:01:28.366319-04:00 bco2 phc2sys: [96.194] phc offset -2000348629 s2 freq -81909 delay 1716
2017-06-12T19:01:29.366440-04:00 bco2 phc2sys: [97.194] phc offset -2000292879 s2 freq -153499 delay 47
2017-06-12T19:01:30.366586-04:00 bco2 phc2sys: [98.195] phc offset -2000164565 s2 freq -121041 delay 47
2017-06-12T19:01:31.366723-04:00 bco2 phc2sys: [99.195] phc offset -2000069225 s2 freq -41185 delay 55
if I drop the -E linreg (using PI loop) I donât have this issue. Any thoughts? Iâm using "-a -r -N 25 -E linreg"
I added some extra logs in clockadj.c to log ticks and freq, I can include those if it would be helpful.
2017-06-12T19:00:17.551561-04:00 bco2 phc2sys: [25.183] failed to adjust the clock: Invalid argument
2017-06-12T19:00:18.551709-04:00 bco2 phc2sys: [26.183] reconfiguring after port state change
2017-06-12T19:00:18.551721-04:00 bco2 phc2sys: [26.183] selecting CLOCK_REALTIME for synchronization
2017-06-12T19:00:18.551726-04:00 bco2 phc2sys: [26.183] selecting eth2 as the master clock
2017-06-12T19:00:18.551790-04:00 bco2 phc2sys: [26.183] phc offset 196930623 s0 freq +1000000000 delay 51
2017-06-12T19:00:19.551917-04:00 bco2 phc2sys: [27.183] phc offset 196905268 s0 freq +1000000000 delay 56
2017-06-12T19:00:20.552050-04:00 bco2 phc2sys: [28.183] phc offset 196880154 s0 freq +1000000000 delay 57
2017-06-12T19:00:21.355353-04:00 bco2 phc2sys: [29.183] phc offset 196855592 s1 freq +100000000 delay 1713
2017-06-12T19:00:22.355485-04:00 bco2 phc2sys: [30.183] phc offset -111043198 s2 freq +100000000 delay 1539
2017-06-12T19:00:23.355900-04:00 bco2 phc2sys: [31.184] phc offset -222219586 s2 freq +100000000 delay 41
2017-06-12T19:00:24.356082-04:00 bco2 phc2sys: [32.184] phc offset -333383570 s2 freq +100000000 delay 41
2017-06-12T19:00:25.356227-04:00 bco2 phc2sys: [33.184] phc offset -444540013 s2 freq +100000000 delay 44
2017-06-12T19:00:26.356366-04:00 bco2 phc2sys: [34.184] phc offset -555693635 s2 freq +100000000 delay 44
2017-06-12T19:00:27.356490-04:00 bco2 phc2sys: [35.184] phc offset -666847284 s2 freq +100000000 delay 57
2017-06-12T19:00:28.356649-04:00 bco2 phc2sys: [36.185] phc offset -777999637 s2 freq +100000000 delay 40
2017-06-12T19:00:29.356792-04:00 bco2 phc2sys: [37.185] phc offset -889157226 s2 freq +100000000 delay 40
2017-06-12T19:00:30.356914-04:00 bco2 phc2sys: [38.185] phc offset -1000312121 s2 freq +100000000 delay 43
2017-06-12T19:00:31.357051-04:00 bco2 phc2sys: [39.185] phc offset -1111463984 s2 freq +100000000 delay 86
2017-06-12T19:00:32.357145-04:00 bco2 phc2sys: [40.185] phc offset -1222616536 s2 freq +100000000 delay 43
2017-06-12T19:00:33.357248-04:00 bco2 phc2sys: [41.185] phc offset -1333765929 s2 freq +100000000 delay 1437
2017-06-12T19:00:34.357387-04:00 bco2 phc2sys: [42.185] phc offset -1444922024 s2 freq +100000000 delay 46
2017-06-12T19:00:35.357542-04:00 bco2 phc2sys: [43.186] phc offset -1556079842 s2 freq +100000000 delay 42
2017-06-12T19:00:36.357656-04:00 bco2 phc2sys: [44.186] phc offset -1667230540 s2 freq +100000000 delay 43
2017-06-12T19:00:37.357787-04:00 bco2 phc2sys: [45.186] phc offset -1778384396 s2 freq +100000000 delay 53
2017-06-12T19:00:38.357918-04:00 bco2 phc2sys: [46.186] phc offset -1889538277 s2 freq +100000000 delay 47
2017-06-12T19:00:39.358041-04:00 bco2 phc2sys: [47.186] phc offset -2000692669 s2 freq +100000000 delay 1453
2017-06-12T19:00:40.358152-04:00 bco2 phc2sys: [48.186] phc offset -2111845429 s2 freq -560981 delay 1423
2017-06-12T19:00:41.358303-04:00 bco2 phc2sys: [49.186] phc offset -2111300380 s2 freq -55880536 delay 60
2017-06-12T19:00:42.358492-04:00 bco2 phc2sys: [50.186] phc offset -2058356966 s2 freq -84947498 delay 59
2017-06-12T19:00:43.358696-04:00 bco2 phc2sys: [51.187] phc offset -1980071281 s2 freq -45492825 delay 67
2017-06-12T19:00:44.358855-04:00 bco2 phc2sys: [52.187] phc offset -1936565859 s2 freq +2726509 delay 52
2017-06-12T19:00:45.359001-04:00 bco2 phc2sys: [53.187] phc offset -1939296933 s2 freq +40481207 delay 44
2017-06-12T19:00:46.359123-04:00 bco2 phc2sys: [54.187] phc offset -1981527504 s2 freq +41084104 delay 44
2017-06-12T19:00:47.359241-04:00 bco2 phc2sys: [55.187] phc offset -2024402721 s2 freq +18263875 delay 46
2017-06-12T19:00:48.359646-04:00 bco2 phc2sys: [56.188] phc offset -2043022503 s2 freq -12112771 delay 1583
2017-06-12T19:00:49.359906-04:00 bco2 phc2sys: [57.188] phc offset -2031094619 s2 freq -27456863 delay 1603
2017-06-12T19:00:50.360091-04:00 bco2 phc2sys: [58.188] phc offset -2004393943 s2 freq -23399703 delay 66
2017-06-12T19:00:51.360270-04:00 bco2 phc2sys: [59.188] phc offset -1981550186 s2 freq -6106846 delay 1618
2017-06-12T19:00:52.360476-04:00 bco2 phc2sys: [60.188] phc offset -1975497514 s2 freq +10251086 delay 1619
2017-06-12T19:00:53.360673-04:00 bco2 phc2sys: [61.189] phc offset -1985894666 s2 freq +16477922 delay 1579
2017-06-12T19:00:54.360804-04:00 bco2 phc2sys: [62.189] phc offset -2002672476 s2 freq +11093292 delay 1571
2017-06-12T19:00:55.360962-04:00 bco2 phc2sys: [63.189] phc offset -2013916914 s2 freq +238342 delay 55
2017-06-12T19:00:56.361093-04:00 bco2 phc2sys: [64.189] phc offset -2014185661 s2 freq -8292577 delay 64
2017-06-12T19:00:57.361281-04:00 bco2 phc2sys: [65.189] phc offset -2005985697 s2 freq -9802301 delay 62
2017-06-12T19:00:58.361439-04:00 bco2 phc2sys: [66.189] phc offset -1996302200 s2 freq -5083480 delay 59
2017-06-12T19:00:59.361597-04:00 bco2 phc2sys: [67.190] phc offset -1991269736 s2 freq +1539388 delay 47
2017-06-12T19:01:00.361742-04:00 bco2 phc2sys: [68.190] phc offset -1992833854 s2 freq +5604798 delay 44
2017-06-12T19:01:01.361894-04:00 bco2 phc2sys: [69.190] phc offset -1998496667 s2 freq +5273009 delay 43
2017-06-12T19:01:02.362030-04:00 bco2 phc2sys: [70.190] phc offset -2003823803 s2 freq +1804365 delay 57
2017-06-12T19:01:03.362182-04:00 bco2 phc2sys: [71.190] phc offset -2005655728 s2 freq -1923388 delay 43
2017-06-12T19:01:04.362316-04:00 bco2 phc2sys: [72.190] phc offset -2003759785 s2 freq -3644365 delay 58
2017-06-12T19:01:05.362472-04:00 bco2 phc2sys: [73.190] phc offset -2000152641 s2 freq -2772461 delay 48
2017-06-12T19:01:06.362607-04:00 bco2 phc2sys: [74.191] phc offset -1997412732 s2 freq -437308 delay 46
2017-06-12T19:01:07.362772-04:00 bco2 phc2sys: [75.191] phc offset -1996999757 s2 freq +1583367 delay 47
2017-06-12T19:01:08.362912-04:00 bco2 phc2sys: [76.191] phc offset -1998611717 s2 freq +2131027 delay 56
2017-06-12T19:01:09.363056-04:00 bco2 phc2sys: [77.191] phc offset -2000772602 s2 freq +1247206 delay 57
2017-06-12T19:01:10.363209-04:00 bco2 phc2sys: [78.191] phc offset -2002046815 s2 freq -183359 delay 56
2017-06-12T19:01:11.363356-04:00 bco2 phc2sys: [79.191] phc offset -2001887859 s2 freq -1176955 delay 45
2017-06-12T19:01:12.363488-04:00 bco2 phc2sys: [80.191] phc offset -2000737109 s2 freq -1243613 delay 59
2017-06-12T19:01:13.363617-04:00 bco2 phc2sys: [81.192] phc offset -1999519966 s2 freq -577278 delay 130
2017-06-12T19:01:14.363742-04:00 bco2 phc2sys: [82.192] phc offset -1998967780 s2 freq +291828 delay 50
2017-06-12T19:01:15.363866-04:00 bco2 phc2sys: [83.192] phc offset -1999285374 s2 freq +732762 delay 48
2017-06-12T19:01:16.363991-04:00 bco2 phc2sys: [84.192] phc offset -2000043233 s2 freq +605879 delay 46
2017-06-12T19:01:17.364129-04:00 bco2 phc2sys: [85.192] phc offset -2000674819 s2 freq +145709 delay 50
2017-06-12T19:01:18.364266-04:00 bco2 phc2sys: [86.192] phc offset -2000845943 s2 freq -312543 delay 58
2017-06-12T19:01:19.364412-04:00 bco2 phc2sys: [87.192] phc offset -2000558636 s2 freq -478808 delay 48
2017-06-12T19:01:20.364576-04:00 bco2 phc2sys: [88.193] phc offset -2000104053 s2 freq -323273 delay 1598
2017-06-12T19:01:21.364749-04:00 bco2 phc2sys: [89.193] phc offset -1999806420 s2 freq -10156 delay 1597
2017-06-12T19:01:22.364908-04:00 bco2 phc2sys: [90.193] phc offset -1999822277 s2 freq +198055 delay 45
2017-06-12T19:01:23.365082-04:00 bco2 phc2sys: [91.193] phc offset -2000044565 s2 freq +240083 delay 1599
2017-06-12T19:01:24.365228-04:00 bco2 phc2sys: [92.193] phc offset -2000310301 s2 freq +112863 delay 1598
2017-06-12T19:01:25.365388-04:00 bco2 phc2sys: [93.193] phc offset -2000449082 s2 freq -102722 delay 47
2017-06-12T19:01:26.365761-04:00 bco2 phc2sys: [94.194] phc offset -2000370876 s2 freq -80148 delay 1596
2017-06-12T19:01:27.366142-04:00 bco2 phc2sys: [95.194] phc offset -2000316912 s2 freq +7256 delay 63
2017-06-12T19:01:28.366319-04:00 bco2 phc2sys: [96.194] phc offset -2000348629 s2 freq -81909 delay 1716
2017-06-12T19:01:29.366440-04:00 bco2 phc2sys: [97.194] phc offset -2000292879 s2 freq -153499 delay 47
2017-06-12T19:01:30.366586-04:00 bco2 phc2sys: [98.195] phc offset -2000164565 s2 freq -121041 delay 47
2017-06-12T19:01:31.366723-04:00 bco2 phc2sys: [99.195] phc offset -2000069225 s2 freq -41185 delay 55