[wellylug] NTP

Cliff Pratt enkidu at cliffp.com
Thu Feb 17 21:18:46 NZDT 2005


Rosemary McGillicuddy wrote:
> Hi
> 
> Does anyone use NTP and is it worthwhile?
> 
> My clock in linux is always either an hour out or 13 hours out - daylight 
> saving?  It is also one hour different to windows - not that that matters 
> much as I hardly ever boot to windows now I have Mandrake going.
> 
> Any advice appreciated.
> 
I use ntp on every server I run. It is easy to set up, so 
long as you can reach a timeserver on the Internet. If you 
are behind a firewall it must allow access to the Internet 
over UDP port 123. That's usually not a problem.

Since you are dual booting to Windows *do not* set the 
hardware clock to UTC (aka GMT). In Debian based distros, 
this is set in /etc/default/rcS. I don't know what it on 
RedHat based distros like Mandrake, sorry.

Usually, there is no config of the ntp server to be done (at 
least on Debian). The package should have conf files already 
set up to use pool.ntp.org.

Set the timezone correctly to Pacific/Auckland according to 
how your distro does it.

Set the time to near the correct time and ensure that the 
ntp server is *NOT* running. From the command line run:

ntpd -q

This may take several minutes to run, but should come back 
with a "slew" number. If it doesn't write anything, just 
exits silently it hasn't worked, and you'll have to look at 
the log files (Check your connectivity).

If it comes back with a "slew" figure you are OK. Run ntpd 
-q a few times for luck, then start the ntp server.

If ntp is too much for you, you could use the (deprecated) 
ntpdate and schedule it to run periodically.

Cheers,

Cliff




More information about the wellylug mailing list