• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: discovering whether the time on a host is correct (and being updated)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: discovering whether the time on a host is correct (and being updated)


  • Subject: Re: discovering whether the time on a host is correct (and being updated)
  • From: Chris Heimark <email@hidden>
  • Date: Thu, 29 Nov 2007 20:05:25 -0500

I have discovered that I can run "ntpq -p" on a command line and I may get an outcome similar to this:

[imacg5:~] chris% ntpq -p
remote refid st t when poll reach delay offset jitter
= = = = = = = = ======================================================================
time2.apple.com a17-106-100-13. 2 u 1563 68m 1 89.775 -0.729 0.008
[imacg5:~] chris%

On my machine, I do not seem to have the '*' in the first column indicating "happiness" on the part of ntpq. A Unix box at work, being fed by GPS and other peers, always has a * next to one of the entries. man ntpq indicates that ' ' in first column means, and I quote:

space (reject) The peer is discarded as unreachable, synchronized to this server (synch loop) or
outrageous synchronization distance.

Questions:
1) Should I expect a * if all is well and time is synched properly?

Yes.
As I thought.

2) Is this as good a way as any to determine whether a host machine is legitimately holding the right time?

The really depends on what you mean by "the right time". Knowing that machine is synchronized to some time server that you do not control does not really tell you much at all.
UTC is a pretty well defined concept. It is certainly possible for me to know what server is being utilized, how long ago an update occurred and therefore have some fairly strong assurance that the time is correct. 


You should explain what you are trying to accomplish. What is the motivation for needing to be tightly synchronized?
Your right. 

My software relies on time as a common factor in algorithm that determines communications parameters. Two or more parties communicating must all be on the same time to within a minute. I figure if I can determine whether the time is right I can be assured that the algorithms in place will work as required.

3) What might I do on my own machine to achieve '*' status? ;-) 
Fix whatever caused time2.apple.com to be unreachable 1563 seconds prior to when you ran that command? I believe that your ntpq output indicates that your machine is having problems talking to time2.apple.com. A firewall or a local network problem could cause that, as could an outage of time2.apple.com.


I am unsure how I am to do this. Here is another couple of readings from Apple server

[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  17.254.0.49      2 u    1  68m    1   87.314   -0.876   0.008
[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  17.254.0.49      2 u   17  68m    1   87.314   -0.876   0.008
[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  17.254.0.49      2 u 1474  68m    1   87.314   -0.876   0.008
[imacg5:~] chris% 

I interpret the 68m as 68 minutes of interval before checking time again. But that seems inconsistent with 'u' setting indicating unicast. Does unicast even route over the internet? I assume it must or why else would Apple use it rather than TCP connections? Also, I have network  time allowed in firewall ... so I am a bit confused by this apparent failure. Might Comcast be blocking unicast NTP?

Thanks for your help.

Chris


--

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: discovering whether the time on a host is correct (and being updated)
      • From: Chris Heimark <email@hidden>
    • Re: discovering whether the time on a host is correct (and being updated)
      • From: John Harte <email@hidden>
  • Prev by Date: Re: discovering whether the time on a host is correct (and being updated)
  • Next by Date: AX.25?
  • Previous by thread: Re: discovering whether the time on a host is correct (and being updated)
  • Next by thread: Re: discovering whether the time on a host is correct (and being updated)
  • Index(es):
    • Date
    • Thread