Linux Step By Steps

TIMEKEEPING-AUTO SYNC
Author mikea@norfolk.nf


While connected to the internet, take advantage of keeping your system close to atomic clock time. Insert this statement either in a script file, or, place it directly in /etc/ppp/ip-up

if rdate -s clock-1.cs.cmu.edu; then
   hwclock --systohc
fi


NB: The rdate program is faulty inasmuch as providing the syntax and options are ok, a non existent clock url will still exit with a 0 status. Each time you connect to the internet, your clock will be updated (rdate accounts for your 'local' time zone)

The hwclock command sets the cmos clock properly on succesful retrieval of the atomic clock.

You could also of course simply run this script inside a cron.daily if you preferred.

rdate may not be installed on your system, it is available of course at http://www.rmpfind.net (look for rdate-960923-1 RPM for i386).
rdate is on the COL Kernel/Installation CD, the full path is /packages/RPMS/rdate-960923-1.i386.rpm


For SuSE Users:
From: Kevin Cullis

Hi,
I don't use Redhat, I use SuSe and I took your autosynching tips and made some changes for those of us who don't use rdate. Here is the script using netdate:

if netdate -v tcp time.nist.gov; then
   hwclock -w
fi


NOTE: The site mentioned above (clock-1 etc) may not be an optimum choice for you, instead look at any of the following links to obtain a 'better' one.

http://www.bldrdoc.gov/timefreq/javaclck.html
http://www.bsdi.com/date?Pacific/Norfolk
http://times.clari.net.au/location.php3?Pacific/Norfolk
http://www.globaltime.net/cgi-bin/gtmain.pl