Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Internet Time Server Settings

Internet Time Server Settings
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Aug 24, 2003, 09:16 PM
 
I use the setting to set the time by apples time server over the internet on my server. Its 10.2 Server. Anyway I wanna set how often it checks its time. Its always way off, I think becuase its an old computer, a Power Tower Pro, and its battery must be dying or something. But its like 10 minutes off by the end of the day. So I wanna change it so it checks its time every hour or two. I know there must be a setting in some files somewhere to change that right?
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Aug 25, 2003, 05:06 PM
 
No, wrong.

Apple goes a strange way there. Instead of synchronizing the time in fixed intervals by getting the time from a timeserver with 'ntpdate', they try to get a full ntpd (time server daemon) running, but they don't provide a valid configuration file (at least last time I checked), so the time gets set exactly once on boot and that's it (try to check whether 'ntpd' is running for you or not).

Your options are:

- either to write a working /etc/ntp.conf, then it would check the time permanently and synchronize your clock (and perhaps have your Mac acting as timeserver). But each time you select the time server settings in the preferences, they would overwrite the conf file with their unusuable version (write protecting it might help there).

- or to turn the time server stuff completely off and call 'ntpdate' periodically (manually, with chron, or whatever else) which would just perform a time synchronisation on each call. I think that's what 99.3% of the OS X users need and want.

-
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Aug 25, 2003, 05:50 PM
 
aaaah i gotcha. I don't wanna do it manually, I've never set up a cron before any easy instructions on how to do it?
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
Aug 25, 2003, 07:21 PM
 
Here is the command you want to run:
ntpq -p 132.163.4.102
(NIST time server in Boulder, CO)
or choose any IP address on the list here:
http://www.boulder.nist.gov/timefreq...e-servers.html
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Aug 25, 2003, 07:27 PM
 
actually if i just
Code:
sudo ntpdate
it automatically uses apple's time server and updates it. I just don't know how to set up a cron thinggie so it will do this every hour or two.
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 25, 2003, 08:22 PM
 
Originally posted by l008com:
actually if i just
Code:
sudo ntpdate
it automatically uses apple's time server and updates it. I just don't know how to set up a cron thinggie so it will do this every hour or two.
In a text file with UNIX linefeeds, put this:

Code:
# field allowed values # ----- -------------- # minute 0-59 # hour 0-23 # day of month 1-31 # month 1-12 # day of week 0-7 0 * * * * /usr/sbin/ntpdate >> /var/log/ntpdate.log 2>&1
Save that as something like "root_crontab.txt". Then, on the command-line, type:

Code:
sudo -s
When it asks for the password give it. You are now logged in a root shell. Then, type:

Code:
crontab root_crontab.txt
You can verify that it worked by typing:

Code:
crontab -l
This will list out the crontab. The command as specified will set the clock every hour on the hour. You can tweak it as needed using the info in comments I included.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 25, 2003, 08:24 PM
 
By the way, ntpd is running fine on my ibook:

Code:
[dshaw@flybook ~] ps -auxw | grep ntpd root 380 0.0 0.0 1556 268 ?? Ss 14Aug03 0:26.22 ntpd -f /var/run/ntp.drift -p /var/run/ntpd.pid
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Aug 26, 2003, 02:29 AM
 
Originally posted by Arkham_c:
By the way, ntpd is running fine on my ibook:

Code:
[dshaw@flybook ~] ps -auxw | grep ntpd root 380 0.0 0.0 1556 268 ?? Ss 14Aug03 0:26.22 ntpd -f /var/run/ntp.drift -p /var/run/ntpd.pid
Interesting.. when I checked it would not run properly, but as I said, that's some time ago. If I remember correctly it was because Apple had only that one time server you select in the conf file and nothing to compare to, not even the internal clock. So as others have time sync problems as well I figure it can't be all fixed now, maybe it just runs without updating much. Do you get some reasonable output if you type 'ntpq -p'?

-
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
Aug 26, 2003, 10:35 AM
 
Originally posted by l008com:
...it automatically uses apple's time server and updates it. I just don't know how to set up a cron thinggie so it will do this every hour or two. [/B]
I would suggest not using time.apple.com as the time server; rather, use one of the NIST servers I linked to above.
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Aug 26, 2003, 01:34 PM
 
Originally posted by gatorparrots:
I would suggest not using time.apple.com as the time server; rather, use one of the NIST servers I linked to above.
Would you mind telling us why you suggest not using time.apple.com?

Of course you can choose another, there are hundreds of time servers that don't restrict access to them, however many have access policies that should be respected.

-
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:12 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2