Difference between revisions of "Correct the system time and setup Network Time Protocol (NTP)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
(color edit)
 
(2 intermediate revisions by 2 users not shown)
Line 12: Line 12:
  
 
  <font color=red>apt-get install ntp ntp-simple ntp-server ntpdate</font>
 
  <font color=red>apt-get install ntp ntp-simple ntp-server ntpdate</font>
 +
<font color=green>(this generated an error for me: "ntp: Conflicts: ntp-server" ... i dropped ntp-server)</font>
  
 
3. Your system will now automatically communicate with NTP servers and adjust the system clock.  
 
3. Your system will now automatically communicate with NTP servers and adjust the system clock.  
Line 18: Line 19:
  
 
  <font color=red>/etc/init.d/ntpdate restart</font>
 
  <font color=red>/etc/init.d/ntpdate restart</font>
 +
<font color=green>("ntpdate" did not exist for me in init.d, "ntp" did however)</font>
  
 
5. After a few days uptime the clock can drift off by a few minutes. One can make a 'cron' job of the above command easily through the webmin interface. It's recommended not to do this to occur at midnight (or on the hour) as the time servers will usually be under a heavy load.
 
5. After a few days uptime the clock can drift off by a few minutes. One can make a 'cron' job of the above command easily through the webmin interface. It's recommended not to do this to occur at midnight (or on the hour) as the time servers will usually be under a heavy load.

Latest revision as of 00:08, 12 February 2007

This article originally Based on work by Frontalot at Linkstationwiki.org
1. Correct the LinkStation time zone setting. Use the command:

tzconfig

2. Install the necessary NTP packages. Use the command:

apt-get install ntp ntp-simple ntp-server ntpdate

(this generated an error for me: "ntp: Conflicts: ntp-server" ... i dropped ntp-server)

3. Your system will now automatically communicate with NTP servers and adjust the system clock.

4. The NTP client usually synchronizes the system clock upon boot. However, if you rarely reboot your LinkStation then you may wish to manually force ntpdate to resynchronize the system clock. Use the command:

/etc/init.d/ntpdate restart

("ntpdate" did not exist for me in init.d, "ntp" did however)

5. After a few days uptime the clock can drift off by a few minutes. One can make a 'cron' job of the above command easily through the webmin interface. It's recommended not to do this to occur at midnight (or on the hour) as the time servers will usually be under a heavy load.

6. Edit /etc/ntp.conf to use more time servers. Enter in the appropriate place two, three or more as per:

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
About ntpd
Bar.png
It may take some time, perhaps even a few weeks, for ntpd to build enough drift data to proactively deal with clock drift


7. The NTP daemon will automatically communicate with the available NTP servers and adjust the system clock accordingly. It will also build a drift file to help reduce future clock drift.