"Wei, Catherine" writes:
> Yes, the "-d" can be removed.=20
> Well, the command " sntp -d -S 10.204.134.250" does work well and return st=
> atus is 0 and time synced, but it gives a warning about the koD file. When =
> I said this command didn't work before, it was because I used the command l=
> ike this " sntp -d 10.204.134.250 -S" instead of " sntp -d -S 10.204.134.25=
> 0". Note that the position of "-S" is different. I had thought it was cause=
> d by the KoD warning, but I'm wrong. Sorry. It's actually because of the wr=
> ong place of "-S".
> 
> Well, another problem I should say is:
> Type " sntp -d -s 10.204.134.250", got following result:
> 
> "Sntp [email protected]. Fri Feb 17 07:46:31 UTC 2017 (1)
> Kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or=
>  directory
> 2-16-01-01 00:07:06.367408 (-0100) +35720777.211043 +/- 23813851.6002329 10=
> .204.134.250 s3 no-leap
> adj_systime: Invalid argument"
> Time not synced.
> 
> Type "sntp -d -S 10.204.134.250", got following result:
> "Sntp [email protected]. Fri Feb 17 07:46:31 UTC 2017 (1)
> Kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or=
>  directory
> 2-16-01-01 00:07:09.367408 (-0100) +35720777.211043 +/- 23813851.6002329 10=
> .204.134.250 s3 no-leap"
> Time synced.
> 
> So obviously "-s" doesn't work, "-S" works.
> My ntp version is 4.2.8p8

-s works just fine. The problem is you are trying to slew a *huge*
correction, and the OS is letting you know it can't do that.

> I also use another version 4.2.6p5, both -s and -S work well.

If you feel the need to use sntp instead of just running 'ntpd -g' *at
cold start* (-g should not be used for restart automatically), then yes,
you should use -S (but that will step *all* corrections), or -Ss.

H
--
> 
> Best regards,
> Catherine
> 
> -----Original Message-----
> From: Harlan Stenn [mailto:[email protected]]=20
> Sent: Friday, February 17, 2017 4:09 PM
> To: Wei, Catherine <[email protected]>
> Cc: Harlan Stenn <[email protected]>; [email protected]
> Subject: Re: [Pool] problem about sntp
> 
> "Wei, Catherine" writes:
> > Hi, Harlan:
> >   This problem has been resolved. It's still the KoD that caused it.
> 
> That's just a warning message.
> 
> >   This command "sntp -d -S -K /dev/null 10.204.134.250" works since
> >   the "-K /dev/null" disables the KoD storage.
> 
> The -d should not be needed.
> 
> What is the return status of the sntp command?  If it's 0, it thinks it set=
>  the time.  If it's 1, there was a problem.
> 
> If there was a problem, sntp should have written something to the syslog.  =
> Is there anything interesting there?
> 
> H
> --
> 
> >   Thank you still the same.
> >=20
> > Best regards,
> > Catherine
> >=20
> > -----Original Message-----
> > From: pool=20
> > [mailto:[email protected]] On=3D =20
> > Behalf Of Wei, Catherine
> > Sent: Friday, February 17, 2017 12:53 PM
> > To: Harlan Stenn <[email protected]>
> > Cc: [email protected]
> > Subject: Re: [Pool] problem about sntp
> >=20
> > Hi, Harlan:
> >     I've also tried "sntp -d -S 10.204.134.250" on the embedded=20
> > system, and=3D  got the following result:
> > "sntp [email protected] Thu Feb 16 09:54:19 UTC 2017 (1) No ipv6 support=20
> > avail=3D able, forcing ipv4
> > kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such=20
> > file or=3D  directory
> > handle_lookup(10.204.134.250,0x2)
> > move_fd: estimated max descriptors: 1024, initial socket boundary: 16=20
> > sntp =3D
> > sendpkt: Sending packet to 10.204.134.250:123 ...
> > Packet sent.
> > sock_cb: 10.204.134.250 10.204.134.250:123
> > 1970-01-01 19:25:26.407448 (-0100) +1487240461.716791 +/-=20
> > 991493641.281683 =3D
> > 10.204.134.250 s3 no-leap"
> >=20
> > The sntp version is 4.2.8p8.
> > After a while, the date is still not synced.
> > By the way, when I set my own pc's date to an incorrect date, then use=20
> > the =3D "/usr/sbin/sntp -s -l /tmp/sntp.log 10.204.134.250", the time is=
> =20
> > synced to =3D the right time very quickly.
> >=20
> > I used sntp because this is early requirement from customers, ntpd, ntpda=
> te=3D
> >   also used and these are alternative, we need to make sure all of=20
> > them wor=3D k.
> >=20
> > Thanks
> > Best regards,
> > Catherine
> >    =3D20
> > ________________________________________
> > From: Harlan Stenn <[email protected]>
> > Sent: Friday, February 17, 2017 12:07 PM
> > To: Wei, Catherine
> > Cc: [email protected]
> > Subject: Re: [Pool] problem about sntp
> >=20
> > "Wei, Catherine" writes:
> > > Hello:
> > >
> > >     I met an sntp sync time problem. Not sure if it's related to=20
> > > the=3D20 upgrade of ntp. I logged on to a linux embedded box as root,=20
> > > and the=3D20 time is
> > >
> > > "Thu Jan  1 16:10:15 CET 1970"
> > >
> > >
> > > Then I used sntp command:
> > >
> > > "/usr/sbin/sntp -l /tmp/sntp.log -t 10 10.204.134.250 -s"
> > >
> > >
> > > I got the following result:
> > >
> > > "
> > >
> > > sntp [email protected] Thu Feb 16 09:54:19 UTC 2017 (1)
> > > kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No=20
> > > such=3D20 file or d irectory
> > > 1970-01-01 16:04:55.269888 (-0100) +1487240461.813365 +/-=3D20
> > > 991493641.349652 10
> > > .204.134.250 s3 no-leap?
> > >
> > > "
> > >
> > >
> > > Considering the warning in the second line, I did some research and=20
> > > it=3D20 was ju st a file used for the persistent history of KoD??, it=20
> > > just types =3D
> > a warning.
> > > I don't think this will affect the time sync.
> >=20
> > It is just a warning and will not affecet time sync.
> >=20
> > > According to the last line in the result, it prints out the offset=20
> > > in=3D20 seconds , it seems that the print result is good, but the=20
> > > system time=3D20 is not synced a fter
> >=20
> > You used -s, which slews the correction.  The correction is underway,=20
> > but a=3D  500ppm slew corrects a 1 second change in about 33 minutes. =20
> > So it's gonna=3D  take a while.
> >=20
> > I'm not sure why you're using sntp instead of running ntpd, but you=20
> > might w=3D ant to use -Ss instead.
> >=20
> > H
> > --
> > > I used the sntp command.
> > >
> > >
> > > Can anyone helps me with that? Appreciate it. It bothered me for=3D20=20
> > > several days . Thank you very much.
> > >
> > >
> > >
> > >
> > > Catherine,
> > >
> > > Best regards
> > > _______________________________________________
> > > pool mailing list
> > > [email protected]
> > > https://na01.safelinks.protection.outlook.com/?url=3D3Dhttp%3A%2F%2Flis=
> ts.
> > > ntp.org%2Flistinfo%2Fpool&data=3D3D01%7C01%7CCatherine.Wei%40arris.com
> > > %7C8
> > > ade3ec110e04b1cd68108d456ea7511%7Cf27929ade5544d55837ac561519c3091%7
> > > C1
> > > &sdata=3D3DgBaPB4rsWRwbxFhmB0mb4guLTgtjkCsg47F%2Foet0T5Q%3D&reserved=3D=
> 3
> > > D0
> > >
> > _______________________________________________
> > pool mailing list
> > [email protected]
> > https://na01.safelinks.protection.outlook.com/?url=3D3Dhttp%3A%2F%2Flist
> > s.ntp=3D=20
> > .org%2Flistinfo%2Fpool&data=3D3D01%7C01%7CCatherine.Wei%40arris.com%7C4f
> > a9cba=3D=20
> > a165f4fa0440108d456f11337%7Cf27929ade5544d55837ac561519c3091%7C1&sdata
> > =3D3DGH=3D
> > 0toah8pgDPf5%2B1aPvsyU%2BKkHh682nqOhn11qwMjSc%3D&reserved=3D3D0
> >=20
> 
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to