Using ntp for date correction

I have a tendency to slap things together the first time I try them, and not really take the time to work out how they’re supposed to be done, in the correct, classical *nix sense of things.

That’s the case too for this extremely old Pentium which has some of the worst clock lag I have ever seen on a computer. Over the course of a day (in other words, for every 24-hour span), the machine’s clock usually falls behind by at least a minute. The more I use it, the worse it gets, too. At one point, this machine lagged behind the others by as much as a day and a half. How embarrassing. :oops:

Personally I solved the problem in a way that’s probably less than ideal, but seems to be working. ntp from the contrib repo for Crux can sync the time with a remote server across a network, and without any configuration file editing or fancy footwork.

I inserted the ntp command into /etc/rc.local, and set it to sync against a distant server, and that way the clock is corrected each time the machine boots. ntp seems smart enough to wait for the network to be brought up (via /etc/rc.d/net) before doing its thing.

I read elsewhere that it’s possible to use ntp as a daemon and have it sync repeatedly while the machine is in use. To be honest, this machine has so little resources to work with that I’m not inclined to add something else to the mix. Once at startup gets me within striking distance of “correct,” and that’s good enough for now.

I suppose there is a better, or more orthodox way of setting up ntp, but for my purposes, this is satisfactory. Anyway, it keeps the clock from falling behind by days. :roll:

About these ads

3 Responses to “Using ntp for date correction”


  1. 1 IceBrain 2009/04/28 at 8:56 PM

    My laptop also “lags” (although only a minute per week :| ), so I’ve set up anacron to run it every three days, seems to work fine.

  2. 2 steve 2009/08/13 at 9:10 AM

    PC clocks are notoriously bad at keeping time, as are any non-purpose-built electronic devices. All a PC cares about is its own clock cycles, not if said cycles fit into any greater scheme.That’s why all PC clocks will lag.

    Great blog BTW! ;o)


  1. 1 Three weeks with the Pentium « Motho ke motho ka botho Trackback on 2009/09/07 at 11:00 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,263 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: