OT: clock drift (was: Re: logging postfix and others)
Scott Haneda
talklists at newgeo.com
Mon Mar 2 13:56:35 PST 2009
On Mar 2, 2009, at 3:21 AM, Ryan Schmidt wrote:
> On Mar 1, 2009, at 03:37, Scott Haneda wrote:
>
>> First thing I do in setting up a new server is comment out the log
>> rollers, second is set up a ntpudpate command in launchd to keep
>> the clock from drifting.
>
> I realize this is off-topic now, but you've made me curious. Can the
> clock drift if you do not do this? I thought Apple's "set date and
> time automatically" option was supposed to ensure clocks were
> synchronized. Though I admit I don't know what it does specifically.
I see the clock drift massively on my servers, it seems to be the
worst when you are using a server that does not login to an account,
then apples "set data and time automatically" does not seem to work
well.
This drift is a killer when you are trying to figure something out in
logs that spam multiple machines.
I will add this launchd item:
( Sleep 45 seconds to wait for the network to come up, adjust
accordingly, ugly hack, but works )
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.hostwizard.ntpdate</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sleep</string>
<string>45;</string>
<string>/usr/sbin/ntpdate</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
--
Scott
* If you contact me off list replace talklists@ with scott@ *
More information about the macports-users
mailing list