Home>>>>

How to keep the time accurate on Linux

We noticed that our linux machine's time was drifting by rather alarming results. After being up for 84 days, the time was off by 14 minutes!

This is due to to linux keeping track of time separately from the hardware clock

bash-2.05a# uptime && /sbin/hwclock && date
  1:54pm  up 84 days, 14:53,  8 users,  load average: 2.60, 1.95, 1.56
Wed Apr 21 13:40:04 2004  -1.644576 seconds
Wed Apr 21 13:54:47 EST 2004

I installed ntp from http://www.ntp.org/ ntp-4.2.0.tar.gz

Find your closest public server with good pings http://www.eecis.udel.edu/~mills/ntp/clock1a.html

Created /etc/ntp.conf