Brian Olson

> On Jun 13, 2017, at 2:53 AM, Miroslav Lichvar <mlich...@redhat.com> wrote:
> 
> On Mon, Jun 12, 2017 at 06:01:32PM -0600, Brian Olson wrote:
>> 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
> 
> This is odd.

Got this to occur in the debugger by turning off the auto start and manually 
starting ptp4l and phc2sys at the same time.

215             clockadj_set_freq(c->clkid, ppb);
(gdb) info locals
c = 0x61aa70
clkid = 0
max_ppb = 0
ppb = -1000000000

it’s calling clockadj_set_freq(0, -1000000000)

print realtime_hz
$1 = 100 
print realtime_nominal_tick
$2 = 10000
p (double)-1000000000/1e3/realtime_hz + realtime_nominal_tick
$5 = 0

so, it tries to set 

tx.tick = round(freq / 1e3 / realtime_hz) + realtime_nominal_tick;
which is 0.

the next line re-computes freq:

freq -= 1e3 * realtime_hz * (tx.tick - realtime_nominal_tick)

p 1e3 * realtime_hz * (0-realtime_nominal_tick)
$7 = -1000000000

this ends up making freq 0 as well, causing the call to clock_adjtime to fail.

I added some debug:

void clockadj_set_freq(clockid_t clkid, double freq)
{
        struct timex tx;
        memset(&tx, 0, sizeof(tx));

        pr_notice("clockadj_set_freq(%d), freq: %f",clkid, freq );
        /* With system clock set also the tick length. */
        if (clkid == CLOCK_REALTIME && realtime_nominal_tick) {
                tx.modes |= ADJ_TICK;
                tx.tick = round(freq / 1e3 / realtime_hz) + 
realtime_nominal_tick;
                freq -= 1e3 * realtime_hz * (tx.tick - realtime_nominal_tick);
        }

        tx.modes |= ADJ_FREQUENCY;
        tx.freq = (long) (freq * 65.536);
        pr_notice("clock_adjtime(%d), freq: %ld  tick: %ld realtime_hz: %ld 
realtime_nominal_tick: %ld",
                   clkid, tx.freq, tx.tick, realtime_hz, realtime_nominal_tick);
        if (clock_adjtime(clkid, &tx) < 0)
                pr_err("failed to adjust the clock: %m");
}

double clockadj_get_freq(clockid_t clkid)
{
        double f = 0.0;
        struct timex tx;
        memset(&tx, 0, sizeof(tx));
        if (clock_adjtime(clkid, &tx) < 0) {
                pr_err("failed to read out the clock frequency adjustment: %m");
        } else {
                pr_notice("clockadj_get_freq(%d), freq: %ld  tick: %ld 
realtime_hz: %ld realtime_nominal_tick: %ld",
                          clkid, tx.freq, tx.tick, realtime_hz, 
realtime_nominal_tick);
                f = tx.freq / 65.536;
                if (clkid == CLOCK_REALTIME && realtime_nominal_tick)
                        f += 1e3 * realtime_hz * (tx.tick - 
realtime_nominal_tick);
        }
        return f;
}


This is the non-converging case with linreg:

2017-06-13T12:22:21.373678-04:00 bco2 phc2sys: [26.004] clockadj_get_freq(-37), 
freq: 2062359  tick: 0 realtime_hz: 0 realtime_nominal_tick: 0
2017-06-13T12:22:21.373691-04:00 bco2 phc2sys: [26.005] clockadj_set_freq(-37), 
freq: 31469.100952
2017-06-13T12:22:21.373696-04:00 bco2 phc2sys: [26.005] clock_adjtime(-37), 
freq: 2062359  tick: 0 realtime_hz: 0 realtime_nominal_tick: 0
2017-06-13T12:22:21.373769-04:00 bco2 phc2sys: [26.005] clockadj_get_freq(0), 
freq: 0  tick: 0 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:21.373780-04:00 bco2 phc2sys: [26.005] clockadj_set_freq(0), 
freq: -1000000000.000000
2017-06-13T12:22:21.373785-04:00 bco2 phc2sys: [26.005] clock_adjtime(0), freq: 
0  tick: 0 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:21.373799-04:00 bco2 phc2sys: [26.005] failed to adjust the 
clock: Invalid argument
2017-06-13T12:22:22.373948-04:00 bco2 phc2sys: [27.005] reconfiguring after 
port state change
2017-06-13T12:22:22.373961-04:00 bco2 phc2sys: [27.005] selecting 
CLOCK_REALTIME for synchronization
2017-06-13T12:22:22.373965-04:00 bco2 phc2sys: [27.005] selecting eth2 as the 
master clock
2017-06-13T12:22:22.374022-04:00 bco2 phc2sys: [27.005] phc offset 24218755166 
s0 freq +1000000000 delay     59
2017-06-13T12:22:23.374155-04:00 bco2 phc2sys: [28.005] phc offset 24218730288 
s0 freq +1000000000 delay     65
2017-06-13T12:22:24.374285-04:00 bco2 phc2sys: [29.005] phc offset 24218704438 
s0 freq +1000000000 delay     43
2017-06-13T12:22:01.155746-04:00 bco2 phc2sys: [30.005] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:01.155757-04:00 bco2 phc2sys: [30.005] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:01.155762-04:00 bco2 phc2sys: [30.005] phc offset 24218679583 
s1 freq +100000000 delay     48
2017-06-13T12:22:02.155878-04:00 bco2 phc2sys: [31.005] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:02.155886-04:00 bco2 phc2sys: [31.005] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:02.155890-04:00 bco2 phc2sys: [31.005] phc offset -111039777 
s2 freq +100000000 delay     42
2017-06-13T12:22:03.156010-04:00 bco2 phc2sys: [32.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:03.156019-04:00 bco2 phc2sys: [32.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:03.156023-04:00 bco2 phc2sys: [32.006] phc offset -222196244 
s2 freq +100000000 delay     40
2017-06-13T12:22:04.156146-04:00 bco2 phc2sys: [33.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:04.156153-04:00 bco2 phc2sys: [33.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:04.156162-04:00 bco2 phc2sys: [33.006] phc offset -333347709 
s2 freq +100000000 delay   1537
2017-06-13T12:22:05.156286-04:00 bco2 phc2sys: [34.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:05.156294-04:00 bco2 phc2sys: [34.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:05.156301-04:00 bco2 phc2sys: [34.006] phc offset -444502693 
s2 freq +100000000 delay     53
2017-06-13T12:22:06.156435-04:00 bco2 phc2sys: [35.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:06.156443-04:00 bco2 phc2sys: [35.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:06.156452-04:00 bco2 phc2sys: [35.006] phc offset -555656704 
s2 freq +100000000 delay   1543
2017-06-13T12:22:07.156550-04:00 bco2 phc2sys: [36.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:07.156559-04:00 bco2 phc2sys: [36.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:07.156563-04:00 bco2 phc2sys: [36.006] phc offset -666810759 
s2 freq +100000000 delay   1537
2017-06-13T12:22:08.156627-04:00 bco2 phc2sys: [37.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:08.156636-04:00 bco2 phc2sys: [37.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:08.156643-04:00 bco2 phc2sys: [37.006] phc offset -777959931 
s2 freq +100000000 delay     41
2017-06-13T12:22:09.156790-04:00 bco2 phc2sys: [38.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:09.156799-04:00 bco2 phc2sys: [38.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:09.156803-04:00 bco2 phc2sys: [38.006] phc offset -889114149 
s2 freq +100000000 delay   1542
2017-06-13T12:22:10.156910-04:00 bco2 phc2sys: [39.006] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:10.156917-04:00 bco2 phc2sys: [39.006] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:10.156926-04:00 bco2 phc2sys: [39.006] phc offset -1000269276 
s2 freq +100000000 delay   1540
2017-06-13T12:22:11.157045-04:00 bco2 phc2sys: [40.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:11.157055-04:00 bco2 phc2sys: [40.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:11.157060-04:00 bco2 phc2sys: [40.007] phc offset -1111422421 
s2 freq +100000000 delay     44
2017-06-13T12:22:12.157424-04:00 bco2 phc2sys: [41.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:12.157430-04:00 bco2 phc2sys: [41.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:12.157433-04:00 bco2 phc2sys: [41.007] phc offset -1222578884 
s2 freq +100000000 delay   1538
2017-06-13T12:22:13.157348-04:00 bco2 phc2sys: [42.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:13.157357-04:00 bco2 phc2sys: [42.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:13.157361-04:00 bco2 phc2sys: [42.007] phc offset -1333734169 
s2 freq +100000000 delay   1539
2017-06-13T12:22:14.157452-04:00 bco2 phc2sys: [43.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:14.157462-04:00 bco2 phc2sys: [43.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:14.157467-04:00 bco2 phc2sys: [43.007] phc offset -1444884887 
s2 freq +100000000 delay   1537
2017-06-13T12:22:15.157557-04:00 bco2 phc2sys: [44.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:15.157565-04:00 bco2 phc2sys: [44.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:15.157573-04:00 bco2 phc2sys: [44.007] phc offset -1556035586 
s2 freq +100000000 delay     54
2017-06-13T12:22:16.157687-04:00 bco2 phc2sys: [45.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:16.157695-04:00 bco2 phc2sys: [45.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:16.157700-04:00 bco2 phc2sys: [45.007] phc offset -1667187655 
s2 freq +100000000 delay     41
2017-06-13T12:22:17.157786-04:00 bco2 phc2sys: [46.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:17.157795-04:00 bco2 phc2sys: [46.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:17.157803-04:00 bco2 phc2sys: [46.007] phc offset -1778339915 
s2 freq +100000000 delay     43
2017-06-13T12:22:18.157929-04:00 bco2 phc2sys: [47.007] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:18.157936-04:00 bco2 phc2sys: [47.007] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:18.157952-04:00 bco2 phc2sys: [47.007] phc offset -1889494895 
s2 freq +100000000 delay   1540
2017-06-13T12:22:19.158079-04:00 bco2 phc2sys: [48.008] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:22:19.158085-04:00 bco2 phc2sys: [48.008] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:19.158096-04:00 bco2 phc2sys: [48.008] phc offset -2000652121 
s2 freq +100000000 delay   1535
2017-06-13T12:22:20.158220-04:00 bco2 phc2sys: [49.008] clockadj_set_freq(0), 
freq: 496048.120488
2017-06-13T12:22:20.158228-04:00 bco2 phc2sys: [49.008] clock_adjtime(0), freq: 
-258990  tick: 10005 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:20.158244-04:00 bco2 phc2sys: [49.008] phc offset -2111807640 
s2 freq -496048 delay   1536
2017-06-13T12:22:21.158441-04:00 bco2 phc2sys: [50.008] clockadj_set_freq(0), 
freq: 55835273.114441
2017-06-13T12:22:21.158450-04:00 bco2 phc2sys: [50.008] clock_adjtime(0), freq: 
2311658  tick: 10558 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:21.158454-04:00 bco2 phc2sys: [50.008] phc offset -2111362285 
s2 freq -55835273 delay   1710
2017-06-13T12:22:22.158622-04:00 bco2 phc2sys: [51.008] clockadj_set_freq(0), 
freq: 84972630.111600
2017-06-13T12:22:22.158630-04:00 bco2 phc2sys: [51.008] clock_adjtime(0), freq: 
-1793713  tick: 10850 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:22.158640-04:00 bco2 phc2sys: [51.008] phc offset -2058521298 
s2 freq -84972630 delay   1808
2017-06-13T12:22:23.158848-04:00 bco2 phc2sys: [52.008] clockadj_set_freq(0), 
freq: 45591125.104173
2017-06-13T12:22:23.158858-04:00 bco2 phc2sys: [52.008] clock_adjtime(0), freq: 
-581625  tick: 10456 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:23.158863-04:00 bco2 phc2sys: [52.008] phc offset -1980216701 
s2 freq -45591125 delay   1861
2017-06-13T12:22:24.159025-04:00 bco2 phc2sys: [53.009] clockadj_set_freq(0), 
freq: -2633890.896787
2017-06-13T12:22:24.159037-04:00 bco2 phc2sys: [53.009] clock_adjtime(0), freq: 
-2221073  tick: 9974 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:24.159042-04:00 bco2 phc2sys: [53.009] phc offset -1936616985 
s2 freq +2633891 delay     45
2017-06-13T12:22:25.159247-04:00 bco2 phc2sys: [54.009] clockadj_set_freq(0), 
freq: -40456698.895661
2017-06-13T12:22:25.159257-04:00 bco2 phc2sys: [54.009] clock_adjtime(0), freq: 
2837781  tick: 9595 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:25.159261-04:00 bco2 phc2sys: [54.009] phc offset -1939247537 
s2 freq +40456699 delay     47
2017-06-13T12:22:26.159360-04:00 bco2 phc2sys: [55.009] clockadj_set_freq(0), 
freq: -41129627.891637
2017-06-13T12:22:26.159371-04:00 bco2 phc2sys: [55.009] clock_adjtime(0), freq: 
-1941693  tick: 9589 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:22:26.159375-04:00 bco2 phc2sys: [55.009] phc offset -1981443852 
s2 freq +41129628 delay     51
2017-06-13T12:22:26.460028-04:00 bco2 phc2sys: [55.310] clockadj_set_freq(0), 
freq: 100000000.000000
2017-06-13T12:22:26.460043-04:00 bco2 phc2sys: [55.310] clock_adjtime(0), freq: 
0  tick: 11000 realtime_hz: 100 realtime_nominal_tick: 10000
 
converging case with PI loop:

2017-06-13T12:00:54.243763-04:00 bco2 phc2sys: [25.874] clockadj_get_freq(-37), 
freq: 2122149  tick: 0 realtime_hz: 0 realtime_nominal_tick: 0
2017-06-13T12:00:54.243778-04:00 bco2 phc2sys: [25.874] clockadj_set_freq(-37), 
freq: 32381.423950
2017-06-13T12:00:54.243782-04:00 bco2 phc2sys: [25.874] clock_adjtime(-37), 
freq: 2122149  tick: 0 realtime_hz: 0 realtime_nominal_tick: 0
2017-06-13T12:00:54.243859-04:00 bco2 phc2sys: [25.874] clockadj_get_freq(0), 
freq: 0  tick: 0 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:54.243866-04:00 bco2 phc2sys: [25.874] clockadj_set_freq(0), 
freq: -1000000000.000000
2017-06-13T12:00:54.243869-04:00 bco2 phc2sys: [25.874] clock_adjtime(0), freq: 
0  tick: 0 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:54.243880-04:00 bco2 phc2sys: [25.874] failed to adjust the 
clock: Invalid argument
2017-06-13T12:00:55.244040-04:00 bco2 phc2sys: [26.875] reconfiguring after 
port state change
2017-06-13T12:00:55.244052-04:00 bco2 phc2sys: [26.875] selecting 
CLOCK_REALTIME for synchronization
2017-06-13T12:00:55.244064-04:00 bco2 phc2sys: [26.875] selecting eth2 as the 
master clock
2017-06-13T12:00:55.244114-04:00 bco2 phc2sys: [26.875] phc offset 221607705 s0 
freq +1000000000 delay     54
2017-06-13T12:00:56.022680-04:00 bco2 phc2sys: [27.875] clockadj_set_freq(0), 
freq: -100000000.000000
2017-06-13T12:00:56.022691-04:00 bco2 phc2sys: [27.875] clock_adjtime(0), freq: 
0  tick: 9000 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:56.022695-04:00 bco2 phc2sys: [27.875] phc offset 221582147 s1 
freq +100000000 delay     47
2017-06-13T12:00:57.022772-04:00 bco2 phc2sys: [28.875] clockadj_set_freq(0), 
freq: 11035768.000000
2017-06-13T12:00:57.022784-04:00 bco2 phc2sys: [28.875] clock_adjtime(0), freq: 
2344091  tick: 10110 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:57.022792-04:00 bco2 phc2sys: [28.875] phc offset -111035768 
s2 freq -11035768 delay     48
2017-06-13T12:00:58.022928-04:00 bco2 phc2sys: [29.875] clockadj_set_freq(0), 
freq: 33446162.400000
2017-06-13T12:00:58.022939-04:00 bco2 phc2sys: [29.875] clock_adjtime(0), freq: 
3025299  tick: 10334 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:58.022952-04:00 bco2 phc2sys: [29.875] phc offset -100135432 
s2 freq -33446162 delay     46
2017-06-13T12:00:59.023131-04:00 bco2 phc2sys: [30.875] clockadj_set_freq(0), 
freq: 31133332.000000
2017-06-13T12:00:59.023140-04:00 bco2 phc2sys: [30.875] clock_adjtime(0), freq: 
2184445  tick: 10311 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:00:59.023145-04:00 bco2 phc2sys: [30.875] phc offset -67781972 s2 
freq -31133332 delay   1771
2017-06-13T12:01:00.023283-04:00 bco2 phc2sys: [31.875] clockadj_set_freq(0), 
freq: 21296424.600000
2017-06-13T12:01:00.023293-04:00 bco2 phc2sys: [31.875] clock_adjtime(0), freq: 
-234317  tick: 10213 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:01:00.023303-04:00 bco2 phc2sys: [31.875] phc offset -37610473 s2 
freq -21296425 delay     58
2017-06-13T12:01:01.023480-04:00 bco2 phc2sys: [32.876] clockadj_set_freq(0), 
freq: 11746891.500000
2017-06-13T12:01:01.023489-04:00 bco2 phc2sys: [32.876] clock_adjtime(0), freq: 
3073081  tick: 10117 realtime_hz: 100 realtime_nominal_tick: 10000
2017-06-13T12:01:01.023494-04:00 bco2 phc2sys: [32.876] phc offset -16777798 s2 
freq -11746891 delay   1757
2017-06-13T12:01:02.023622-04:00 bco2 phc2sys: [33.876] clockadj_set_freq(0), 
freq: 5188251.900000
2017-06-13T12:01:02.023632-04:00 bco2 phc2sys: [33.876] clock_adjtime(0), freq: 
-769923  tick: 10052 realtime_hz: 100 realtime_nominal_tick: 10000

> 
>> 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
> 
> Hm, the initial frequency offset is 1, so the servo thinks the clock
> is stopped. This explains the weird 2 second offset.
> 
> What kernel, arch, and libc is this? Can you please check what value
> has the realtime_hz variable in clockadj.c?


print realtime_hz
$1 = 100 

Linux 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 
x86_64 GNU/Linux
glibc.i686                                              2.12-1.149.el6
glibc.x86_64                                            2.12-1.149.el6

> 
> -- 
> Miroslav Lichvar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to