Server's Date and Time drifting...

We have 4 Xserves (2xPPC, 2xIntel) running 10.5.1

In System Preferences/Date and Time we have 'Set Date & Time Automatically' checked, and the IP address of an internal time server (the corporate network blocks access to Apple's time servers).

So far so good.

Over a period of weeks the time on the servers drifts out by several minutes. Just opening the Sys-Prefs/Date and Time control panel appears to make the server query the time server and the clock is pulled back into step (for a few more weeks at any rate).

My question is this: Should this time update happen automatically, and if so how often? If not, is there a way I can make it so?

G5 + MacPro, Mac OS X (10.5.1), Octos, Quads, Duals

Posted on Apr 18, 2008 4:31 AM

Reply
8 replies

Apr 18, 2008 5:09 PM in response to VTmaint

Is the internal NTP server on one of these Xserves? If it is and your firewall is closed to checking against outside NTP servers, how does it keep accurate time? If it's not, then you need to change the configuration of the ntpd daemon on your servers because they are not querying your internal NTP server properly.

First, open Terminal and enter:

ps aux | grep ntp

to see if the ntpd daemon is running.

If it's not or the time is way off, edit -using vi or pico- this file:

/private/etc/ntp.conf

so it looks like this:

server 123.45.67.89 prefer minpoll 12 maxpoll 15 iburst

(where 123.45.67.89 is the IP number of your internal NTP server)save the file and then enter this in Terminal:

chflags uchg /private/etc/ntp.conf

That will lock the file from changes by the 'Date and Time' System Prefpane.

Then edit /private/etc/host.config -using vi or pico- adding this line if it's not there already:

TIMESYNC=-YES-

Then reboot the server. Yes, reboot.

If the internal NTP server is a Windows AD domain master setup as an SNTP server for the AD domain, you should check the system log on your Xserves when they reboot to see if they are syncing with the server. If they are not syncing you will see entries in the system log such as "no servers found for synchronization". If that's the case then you will have to set up one of your Xserves, preferably your OD master if you're running OD, to be an NTP server.

First, you need to come up with a list of at least three stratum 2 public NTP servers and give that list to your firewall administrator and tell him to open access to those servers. Take a look at this list and follow the rules for notification of the system operators:

http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers

Then, on the machine you wish to be your NTP server -again preferably your OD master- open the 'Date and Time' System Prefpane and uncheck 'Set Date&Time Automatically' then close the System Preferences.

Then edit /private/etc/host.config -using vi or pico- change this line from this:

TIMESYNC=-YES-

to this:

TIMESYNC=-NO-

then add this line if it's not there already:

TIMSERV=-YES-

then save the file.

Then do this:

chflags nouchg /private/etc/ntp.conf

then edit /private/etc/ntp.conf to look like this:

server first.ntpserver.com prefer minpoll 12 maxpoll 15 iburst
server second.ntpserver.com minpoll 12 maxpoll 15 iburst
server third.ntpserver.com minpoll 12 maxpoll 15 iburst

do not use the IP numbers of the external servers, use the FQDNs of the servers because if they change the IP numbers, you're stuffed. Then save the file and enter this in Terminal:

chflags uchg /private/etc/ntp.conf

That will lock the file from changes by the 'Date and Time' System Prefpane and the Server Admin program.

Then reboot the server. Yes, reboot.

When the server restarts, don't attempt to change the status of the checkbox for NTP in Server Admin or the state of the checkbox in the 'Date & Time' System Prefpane, do check the system log to see if the ntpd daemon started and is running. You should see messages about successful synchronization. If you see messages about not being able to contact the servers you have chosen to sync against, check with Network Utility to see if the FQDNs of those servers resolve and that your firewall is open for them.

The man page for ntpd(8) has all the necessary info to answer any questions about configuration tweaks that you may need.

Jul 2, 2008 12:12 AM in response to ktkenny

hey guys i found a solution from my vendor. Give a shot and try.

Use the terminal and be a root user and follow the steps bellow:
cd /etc
more ntp.conf

Then include this two lines:

server 127.127.1.1 prefer
fudge 127.127.1.1 stratum 3 refid NIST

After that save and exit. Then check your ntp using the server admin tool and thats done.

Jul 2, 2008 8:28 PM in response to Alex Geis

Retry again the steps cause when i do hard reboot or soft reboot my ntpd setting is still there and running fine.

When you have select a specific server to be the ntp server don't meddle with system preferences time(uncheck "set date and time automatically" at time and date system preferences, first before you tick the ntp setting on server admin tool).

After that then you input the command line into ntp.conf

Next be a root user and use the terminal to check the ntpd process:
ps aux | grep ntp

Then try to kill of the ntpd process and check back again using: ps aux | grep ntp
It will automatically restart the service each time you kill it. This means your ntp is working well after you tick the setting in your server admin tool. As for the date and time in system preferences don't do anything with it after you set everything nicely cause it will mess your current working ntp settings. Lastly try reboot your system and see the ntpd service is still up or not. Good Luck.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Server's Date and Time drifting...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.