[ntp:questions] about the kernel discipline on embedded product

Tim Tanguy.ropitault at gmail.com
Wed Apr 26 08:35:58 UTC 2006


Hi,
in the ntp faq, it's written:
"Does my Operating System have the Kernel Discipline?
To make sure, try using the ntp_gettime() system call."

Fist, I made this test on a machine... and I have the system call
ntp_gettime(). So I think I have the kernel discipline. It's confirmed
in the /var/log/ntp.log file with the line:
kernel time sync enabled.
I also tried the command ntptime which gives:
ntp_gettime() returns code 0 (OK)
  time c7f9adc5.296ee000  Wed, Apr 26 2006 10:28:53.161, (.161848),
  maximum error 274450 us, estimated error 10661 us
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 1755.000 us, frequency -3.955 ppm, interval 4 s,
  maximum error 274450 us, estimated error 10661 us,
  status 0x1 (PLL),
  time constant 4, precision 1.000 us, tolerance 512 ppm,
  pps frequency 0.000 ppm, stability 512.000 ppm, jitter 200.000 us,
  intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

So everything seems to be OK. I dont use a PPS source so PPS values are
normal. And I use the kernel discipline with a PLL. Am I right?


Now, I want to check that the kernel discipline on my embedded product.
It's based on a Power PC CPU... I do exactly the same test.
ntp_gettime() system call works fine. But when i check my ntp.log,
there is always the line:
ntp sync disabled... and I don't know why. Also if I do ntptime, here
is the output:

ntp_gettime() returns code 5 (ERROR)
  time c7f9aeee.336f6000  Wed, Apr 26 2006  8:33:50.200, (.200918),
    maximum error 227078 us, estimated error 3816 us
    ntp_adjtime() returns code 5 (ERROR)
      modes 0x0 (),
        offset 2899.000 us, frequency 162.167 ppm, interval 4 s,
          maximum error 227078 us, estimated error 3816 us,
            status 0x1 (PLL),
              time constant 0, precision 1.000 us, tolerance 512 ppm,
                pps frequency 0.000 ppm, stability 512.000 ppm, jitter
200.000 us,
                  intervals 0, jitter exceeded 0, stability exceeded 0,
errors 0.
So why Have I return code 5 ERROR? and if the kernel discipline
enabled? I think that yes because the status is PLL but i'm not sure...


Please help... thanks




More information about the questions mailing list