Re: Clock drift problems
From: Michael W. Cocke (cocke_at_catherders.com)
Date: 01/19/04
- Next message: Michael W. Cocke: "Re: DSL modems"
- Previous message: LEE Sau Dan: "Re: Accounting program for linux"
- In reply to: Allan Cady: "Clock drift problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 19 Jan 2004 06:53:18 -0500
On 18 Jan 2004 19:04:02 -0800, allancady@yahoo.com (Allan Cady) wrote:
>Disclaimer: I'm asking this question about a Linux box, which I use
>only as a client of a couple of web-based applications and as a file
>server. I know almost nothing about Linux, or Unix. I'm a Windows
>guy. So please go easy on me!
I'll try. 8-)>
>The problem is, on this Linux machine (Red Hat, I don't know what
>version), the real-time clock has gotten 7 hours slow. The guys here
>who administer this machine seem to be stumped about what to do about
>it. (This boggles my mind.) There are two problems: how to get it
>back where it belongs, and how to prevent it from getting out of sync
>in the future.
The answer is setting up the NTP daemon.
>The explanation I'm given about why they can't just "set the clock" is
>that there are applications that would wig out if the clock all of the
>sudden changes by 7 hours. I can understand that, but things like NTP
>are supposed to be able to deal with this kind of thing by adjusting
>the clock slowly over a period of time. I don't know the details, and
>I certainly don't know how to set this up on Linux. And I don't know
>if it's capable of handling such a gross correction.
The explanation is possible, but depends on what apps you're
running... first you need to make sure ntp is installed on your
system - knowing the version of redhat would be a real help - then
it's just a matter of editing 2 files - /etc/ntp.conf and
/etc/ntp/ntpservers (the other files in /etc/ntp should be fine with
the defaults), and setting up ntpd to autostart - probably
'chkconfig --levels 345 ntpd on' without the quotes, if it's a
relatively recent version of redhat.
>The explanation I'm given about why the clock is losing time so badly
>in the first place (about 15 minutes a week), is that it happens when
>we do our weekly backups to DVD-ROM; something is locking out the
>hardware interrupt that makes the clock work. Is this "normal"? They
>claim it's nothing to do with Linux, that it would happen with Windows
>too. I've never seen anything like this happen on Windows... DOS
>maybe, but that was 15 years ago. This is a Dell PowerEdge 1600
>machine, less than a year old.
Yes, weirdly enough, it's true... in a way. Windows drivers don't
lock the interrupts out during disk I/O, which is one of the many
reasons you get data corruption in windows simply by having the
machine in use, but by god the clock is accurate! It also has to do
with exactly WHICH hardware you've got. Some drivers are implemented
one way, and some another. CD and DVD burning is very timing
critical, and if you have one of the newer 'no coaster burn' units and
a proper driver for it, I can see how the linux clock would go off a
bit.. a small bit. 7 hours off? well....
>Given my ignorance of Linux, it's hard for me to ask specific "how do
>you do this" questions... for starters, I'm mostly looking for a
>general opinion of whether this problem is really as confounding as my
>buddies think it is. It may get to questions of "how can we configure
>NTP to do the gross correction without breaking applications", and "is
>there any way to fix the system so that the clock doesn't drift when
>we're doing backups", but to start with, I'd just like to know if I
>can believe the guys who are telling me there's nothing we can do
>about it. Or if maybe I can point them somewhere... tell them, "read
>the man on ...".
There is a setting in the ntp.conf file that controls the maximum
adjustment per hour, if memory serves, so you can nudge the clock back
in line a little at a time. As for fixing it so it doesn't happen
again, if you configure ntpd properly, it will go get the correct time
from a timeserver on the internet and adjust your clock daily - no
drift. I use time-b.nist.gov personally.
As for 'nothing to be done'... No, don't believe them.. I have 2
servers and a bunch of workstations here and all system clocks are
within a second of each other. Setting up ntpd really is a trivial
exercise... Just reading the comments in the files I just mentioned
should get you there.
>Or maybe we should be asking Dell for help with this?
Not unless their tech support has gotten a LOT better since I last
dealt with them.
Mike-
Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------
Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
- Next message: Michael W. Cocke: "Re: DSL modems"
- Previous message: LEE Sau Dan: "Re: Accounting program for linux"
- In reply to: Allan Cady: "Clock drift problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]