> Date: Thu, 23 Oct 2008 23:37:44 PDT > From: Ryan Chang <[EMAIL PROTECTED]> > To: [email protected] > Subject: [sysadmin-discuss] Clock skew caused by ntpdate > > I have 2 Sun T5220 machines in the lab, which synchronize time with a > Sun Netra240 machine every 15 minutes. However, large clock skews are > occasionally found on these two machines. Then I put a script on > crontab which runs every 5 minutes to monitor the time difference with > the time server. The content of this script is as follows: > > crontab -d TimeServer |tail -1 >> /var/tmp/timediff.txt > > When the clock skew is found, I can see from timediff.txt that one of > the machine has executed the script, while the other missed one time:
I think you mean ntpdate...? Do you have xntpd running? After running ntpdate and setting the time, start xntpd. I have several thousand machines sync'd this way. And they run for months staying in step. The only time that I've seen the time get off like that is when there is something wrong with the clock chip. Don't recall there being a patch for this. running xntpd, however, sync's the clock... (Hides the underlying chip error...) Regards, Gregory Hicks > T5220#1: > 23 Oct 11:00:00 ntpdate[8338]: ntpdate 3-5.93e+sun 03/06/05 23:16:45 (1.4) > 23 Oct 11:05:00 ntpdate[9361]: adjust time server 10.170.7.84 offset -0.001842 sec > 23 Oct 11:10:00 ntpdate[10494]: adjust time server 10.170.7.84 offset -0.068542 sec > ------------------------------------------------------------------------ ------------------------ > T5220#2: > 23 Oct 10:55:00 ntpdate[4872]: adjust time server 10.170.7.84 offset -0.078087 sec > 23 Oct 11:00:00 ntpdate[5878]: ntpdate 3-5.93e+sun 03/06/05 23:16:45 (1.4) > 23 Oct 11:10:00 ntpdate[1816]: adjust time server 10.170.7.84 offset -0.045485 sec > 23 Oct 11:15:00 ntpdate[3023]: ntpdate 3-5.93e+sun 03/06/05 23:16:45 (1.4) > > You can see that on T5220#2, the script was not executed at 11:05:00, I suspect that the clock on T5220#2 was set to a time after 11:05:00 by ntpdate so it missed the one at 11:05:00, and the next time it sync time with the server, the clock was corrected, if this kind of problem really happens, it lead to troubles on database replication. Can anyone explain this issue and hopefully tell me how to fix it? > Thanks! > -- > This message posted from opensolaris.org > _______________________________________________ > sysadmin-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss --------------------------------------------------------------------- Gregory Hicks | Principal Systems Engineer Cadence Design Systems | Direct: 408.576.3609 555 River Oaks Pkwy M/S 9B1 San Jose, CA 95134 People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf -- George Orwell The price of freedom is eternal vigilance. -- Thomas Jefferson "The best we can hope for concerning the people at large is that they be properly armed." --Alexander Hamilton _______________________________________________ sysadmin-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss
