• 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: Fri, 30 Nov 2007 11:07:35 -0500

Chris

...

time.apple.com 17.254.0.49 2 u 1474 68m 1 87.314 -0.876 0.008

The 68m is 68 minutes, the number after it is a byte in octal. This byte goes from 1 to 3 to 7 to 17 up to 377. It needs to get to 17 or 37 to get a *. At a 68 minute update this will take hours.

This is controlled by /etc/ntp.conf.

John
John:

Thanks for the explanation. So I see from below terminal output that eventually my computer goes into a state where it could theoretically be a local network source for time - assuming my computer were to host NTP services. So I get that part.

Now, getting back to my original question. If my software were to run the 'ntpq -p' command under a Cocoa NSTask and parse the results, I would certainly be able to conclude whether or not my user was:

a) utilizing "Set date & time automatically" (ntpd services);
b) whether a well known remote domain was being used (say the default apple.com);
c) whether a valid refid was present (and NOT 0.0.0.0), meaning time had been acquired AND set;
d) and by examining offset, how far off the time had been based on last reading.

Using these criteria, wouldn't I be able to conclude that time was "very likely" accurate - at least at the point in time when I conducted the test - to within seconds?

Chris

[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  a17-106-100-13.  2 u  65m  68m    3  122.129  -11.398  14.722
[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  17.254.0.49      2 u  882  68m    7   88.803    9.453  20.851
[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.apple.com  a17-106-100-13.  2 u  384  68m   17  134.028    0.707   8.746
[imacg5:~] chris% ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*time.apple.com  time2.euro.appl  2 u  218  68m   37  145.257   32.584  31.877
[imacg5:~] 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: Ben Artin <email@hidden>
References: 
 >Re: discovering whether the time on a host is correct (and being updated) (From: Chris Heimark <email@hidden>)

  • Prev by Date: Re: AX.25?
  • Next by Date: Re: discovering whether the time on a host is correct (and being updated)
  • 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