f



ntpdate -q, possible units of time in last field

Normally it is "sec". That is to say the content of the last field of the 
output of "ntpdate -q" if it operates successfully is "sec" normally. 
What other values are possible? I could force set my local time 
incorrectly to determine this by experiment, but what I'm reading seems 
to be saying that that will confuse ntpd and is a really BAD thing to do. 
But I want to use the output in a script, and I'd like to anticipate all 
the possibilities. Thanks.
0
Zoro
9/13/2016 7:15:08 PM
comp.protocols.time.ntp 4895 articles. 2 followers. Post Follow

1 Replies
308 Views

Similar Articles

[PageSpeed] 23

On 13/09/16 20:15, Zoro T. Martian wrote:
> Normally it is "sec". That is to say the content of the last field of the
> output of "ntpdate -q" if it operates successfully is "sec" normally.
> What other values are possible? I could force set my local time
> incorrectly to determine this by experiment, but what I'm reading seems
> to be saying that that will confuse ntpd and is a really BAD thing to do.
> But I want to use the output in a script, and I'd like to anticipate all
> the possibilities. Thanks.
>

Slightly old version of the tar ball, but I doubt it has changed:

	if (dostep) {
		if (simple_query || debug || l_step_systime(&server->offset)){
			msyslog(LOG_NOTICE, "step time server %s offset %s sec",
				stoa(&server->srcadr),
				lfptoa(&server->offset, 6));
		}
	} else {
#ifndef SYS_WINNT
		if (simple_query || l_adj_systime(&server->offset)) {
			msyslog(LOG_NOTICE, "adjust time server %s offset %s sec",
				stoa(&server->srcadr),
				lfptoa(&server->offset, 6));
		}


Looks like the only value is "sec"

0
David
9/14/2016 10:47:51 PM
Reply: