![]() |
![]() |
||
|
|
Keeping Accurate Time
I'm late, I'm late...
You'll need to get the ntp package installed on your Linux box using whatever means is appropriate for your distribution. The Thinkpad I use to write this web site is running Redhat 7.2, so I have ntp-4.1.0-4 installed from RPM. Add the following to your /etc/ntp.conf file:
server ntp0.linx.net
server ntp1.linx.net
driftfile /etc/ntp/drift
With a bit of luck and a following wind, one of the following 3 scenarios should cover most people:
1. If your machine is running 24/7 and has a permanent connection to the Internet, type the command chkconfig --level 2345 ntpd on as root, then /usr/sbin/ntpdate ntp0.linx.net, and lastly by service ntpd start. Your system time will now be kept accurate for as long as the machine is powered up, and will automatically re-synchronise the next time it is rebooted. 2. If your machine has a permanent connection to the internet, but doesn't run 24/7, type the command chkconfig --level 2345 ntpd off as root, then /usr/sbin/ntpdate ntp0.linx.net to set the time initially. Add the command to the bottom of /etc/rc.d/rc.local - this script gets run at the very end of the bootup sequence, ensuring that the clock gets set accurately when you switch your machine on. 3. If your machine has a dial-up connection to the internet, type the command chkconfig --level 2345 ntpd off as root, then /usr/sbin/ntpdate ntp0.linx.net to set the time initially. Add the same command to the bottom of /etc/ppp/ip-up.local - this script gets run when a dial up connection has been successfully established. |
![]() |
|
|
I've done my best to ensure that the information given on this site is accurate.
If you make any use of this information, however, you do so entirely at your own risk.
If you lose your job, your house blows up or your dog dies, it's not my fault, okay?
All trademarks and copyrights are owned by their respective companies. Linux is a trademark of Linus Torvalds. HTML coding done
using Bluefish-0.7, together with
wml-2.0.9 (18-Oct-2002) and graphics by The Gimp.
Copyright © 2004 Phil Edwards mailto: webmaster (at) linux2000.com Last updated Sat Jul 16 18:45:38 2005 |