LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2004, 06:52 AM   #1
zoubidoo
LQ Newbie
 
Registered: Mar 2004
Posts: 27

Rep: Reputation: 15
ntp service causing huge time errors


I recently started using the ntpd service to keep my clock accurate.
When I start up the service, the time synchronises fine, but afterwards I get huge errors (several hours in less than a day). If I restart the ntpd service, the time is once again accurate. What is causing the time to go so badly wrong?

Any suggestions much appreciated,

PJ

Platform: FC2, 2.6.8-1.521, ntp-4.2.0-7
Here's my log output:
Code:
[root@darwin zbd]# tail /var/log/ntp.log
23 Nov 12:02:24 ntpd[1025]: running as uid(38)/gid(38) euid(38)/egid(38).
23 Nov 12:36:40 ntpd[1025]: synchronized to 195.13.1.153, stratum=2
23 Nov 12:50:05 ntpd[1025]: time reset +805.706758 s
23 Nov 12:50:05 ntpd[1025]: kernel time sync disabled 0041
Here's the /etc/ntp.conf:
Code:
restrict 127.0.0.1
fudge 127.127.1.0 stratum 3
server europe.pool.ntp.org
driftfile /var/lib/ntp/drift
broadcastdelay  0.008
logfile /var/log/ntp.log
Here's /var/log/ntp/drift:
Code:
500.000
 
Old 11-23-2004, 10:11 AM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Weird. A long time ago, when I first started using linux the ntpd that was included didn't work very well, so I ended up making my own script to update the clock. These problems have since been fixed and on all the boxes I admin ntpd or xntpd works fine. Here is my script that I run on my home linux box, to this day:

#!/bin/sh

CLOCKSERVER="clock.psu.edu"
CUSER=`echo $UID`

if [ $CUSER -ne 0 ]
then
echo "You must be root in order to execute this script"
exit 1
fi

/usr/sbin/ntpdate $CLOCKSERVER

# Setting hardware clock to new time

/sbin/hwclock --systohc

***

I have this run every hour out of root's crontab.

***

Anyway, just a solution, not an answer to your problem.
 
Old 11-23-2004, 10:29 AM   #3
zoubidoo
LQ Newbie
 
Registered: Mar 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Technoslave
[snip]
Anyway, just a solution, not an answer to your problem.
Thanks, if all else fails I'll borrow this script. Of course, it'd be nice to fix the problem though...

PJ
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NTP and Daylight Savings Time jrdioko Linux - Software 8 11-01-2005 09:25 AM
ntp time sync eyewittness Linux - Networking 2 08-11-2004 09:18 AM
Problems with Kobishi router / NTP service R@LF Linux - Hardware 3 07-25-2004 06:02 PM
setting my time server (ntp) Moses420ca Linux - Newbie 9 08-28-2003 03:34 PM
ntp / xntpd service saavik Linux - Networking 0 08-05-2003 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration