Yes, the "-d" can be removed. 
Well, the command " sntp -d -S 10.204.134.250" does work well and return status 
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 like this " 
sntp -d 10.204.134.250 -S" instead of " sntp -d -S 10.204.134.250". Note that 
the position of "-S" is different. I had thought it was caused by the KoD 
warning, but I'm wrong. Sorry. It's actually because of the wrong 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

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


Best regards,
Catherine

-----Original Message-----
From: Harlan Stenn [mailto:[email protected]] 
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.
> 
> Best regards,
> Catherine
> 
> -----Original Message-----
> From: pool 
> [mailto:[email protected]] On=  
> 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
> 
> Hi, Harlan:
>     I've also tried "sntp -d -S 10.204.134.250" on the embedded 
> system, and=  got the following result:
> "sntp [email protected] Thu Feb 16 09:54:19 UTC 2017 (1) No ipv6 support 
> avail= able, forcing ipv4
> kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such 
> file or=  directory
> handle_lookup(10.204.134.250,0x2)
> move_fd: estimated max descriptors: 1024, initial socket boundary: 16 
> sntp =
> 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 +/- 
> 991493641.281683 =
> 10.204.134.250 s3 no-leap"
> 
> 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 
> the = "/usr/sbin/sntp -s -l /tmp/sntp.log 10.204.134.250", the time is 
> synced to = the right time very quickly.
> 
> I used sntp because this is early requirement from customers, ntpd, ntpdate=
>   also used and these are alternative, we need to make sure all of 
> them wor= k.
> 
> Thanks
> Best regards,
> Catherine
>    =20
> ________________________________________
> 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
> 
> "Wei, Catherine" writes:
> > Hello:
> >
> >     I met an sntp sync time problem. Not sure if it's related to 
> > the=20 upgrade of ntp. I logged on to a linux embedded box as root, 
> > and the=20 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 
> > such=20 file or d irectory
> > 1970-01-01 16:04:55.269888 (-0100) +1487240461.813365 +/-=20
> > 991493641.349652 10
> > .204.134.250 s3 no-leap?
> >
> > "
> >
> >
> > Considering the warning in the second line, I did some research and 
> > it=20 was ju st a file used for the persistent history of KoD??, it 
> > just types =
> a warning.
> > I don't think this will affect the time sync.
> 
> It is just a warning and will not affecet time sync.
> 
> > According to the last line in the result, it prints out the offset 
> > in=20 seconds , it seems that the print result is good, but the 
> > system time=20 is not synced a fter
> 
> You used -s, which slews the correction.  The correction is underway, 
> but a=  500ppm slew corrects a 1 second change in about 33 minutes.  
> So it's gonna=  take a while.
> 
> I'm not sure why you're using sntp instead of running ntpd, but you 
> might w= ant to use -Ss instead.
> 
> H
> --
> > I used the sntp command.
> >
> >
> > Can anyone helps me with that? Appreciate it. It bothered me for=20 
> > several days . Thank you very much.
> >
> >
> >
> >
> > Catherine,
> >
> > Best regards
> > _______________________________________________
> > pool mailing list
> > [email protected]
> > https://na01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Flists.
> > ntp.org%2Flistinfo%2Fpool&data=3D01%7C01%7CCatherine.Wei%40arris.com
> > %7C8
> > ade3ec110e04b1cd68108d456ea7511%7Cf27929ade5544d55837ac561519c3091%7
> > C1
> > &sdata=3DgBaPB4rsWRwbxFhmB0mb4guLTgtjkCsg47F%2Foet0T5Q%3D&reserved=3
> > D0
> >
> _______________________________________________
> pool mailing list
> [email protected]
> https://na01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Flist
> s.ntp= 
> .org%2Flistinfo%2Fpool&data=3D01%7C01%7CCatherine.Wei%40arris.com%7C4f
> a9cba= 
> a165f4fa0440108d456f11337%7Cf27929ade5544d55837ac561519c3091%7C1&sdata
> =3DGH=
> 0toah8pgDPf5%2B1aPvsyU%2BKkHh682nqOhn11qwMjSc%3D&reserved=3D0
> 
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to