Sunday, March 18, 2012

Network Time Under Debian With NTP

In November, I installed Debian Squeeze on
a new hard drive. This month (March) the
local time switched to Daylight Savings Time.

I thought that my computer clock would be
updated to the new time automatically. I
was wrong. After waiting all day for the
clock to spring forward by one hour, I decided
to do it by hand.

Today I booted into Windows XP for
the first time in a week. Of course, Windows
jump my clock forward another hour. So now,
instead of being an hour behind, I'm an hour
ahead.

I think I finally got it figured out. I did
a search for the name of the program that keeps
network time automatically and it turns out
it is called NTP.

I should have known. I should have figured
that this program would not be installed
automatically. There are many good reasons
why a network administrator would not want
their computer clock being updated by the
network.

When I run the following command, I see that
NTP is not installed:

$ aptitude show ntp
Package: ntp                             
State: not installed

I've abbreviated the output for the above
aptitude show command. Here's the
key sentence that the above command uses
to describe NTP:

An NTP daemon needs to  be running on each 
host that is to have its clock accuracy 
controlled by NTP.

That one sentence describes my problem
precisely. I"m not running NTP.
I'm going to install NTP and see if it
will automatically update my computer
clock.

OK. Here goes. I'm going to run the
following command:

# aptitude install ntp

Wow! Amazing! My clock just went from
19:20 to 18:21. it appears to have set
itself back an hour the very first minute
that NTP was running.

Thanks NTP!

The lesson? Don't assume a program is running
just because you are used to it running. In
life, it is better not to assume anything unless
you have a good reason for doing so.

Ed Abbott

No comments:

Post a Comment