Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


Search this Thread
Old 12-16-2006, 02:32 PM   #1
Registered: Apr 2002
Location: Ohio
Distribution: RedHat 7.3
Posts: 34

Rep: Reputation: 15
Slow system clock and stray hardware clock, pleas help!

Hi there,
This topic is about a Linux CentOS 4.4 Server (kernel 2.6.9-42.ELsmp, i686)I recently got, but because it is unmanaged I need to figure out this issue myself.

The problem: The system clock runs slwoer than it should. As a result, time looses sync within 2 minutes and continues to becomre more and more wrong. (The hardware clock eventually goes astray too but at a much lower rate.)

To test this I compared the system clock and hardware clock by issuing the following command repeatedly:

date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock

The Output was:
Sat 16 Dec 2006 03:00:12 PM EST
Sat 16 Dec 2006 03:00:39 PM EST -0.415729 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:14 PM EST
Sat 16 Dec 2006 03:00:41 PM EST -0.267476 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:15 PM EST
Sat 16 Dec 2006 03:00:43 PM EST -0.311004 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:16 PM EST
Sat 16 Dec 2006 03:00:45 PM EST -0.239963 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:17 PM EST
Sat 16 Dec 2006 03:00:47 PM EST -0.253718 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:18 PM EST
Sat 16 Dec 2006 03:00:49 PM EST -0.289237 seconds
root@server [~]# date +"%a %d %b %Y %I:%M:%S %p %Z";/sbin/hwclock
Sat 16 Dec 2006 03:00:19 PM EST
Sat 16 Dec 2006 03:00:52 PM EST -0.418886 seconds
It's not as obvious as it could be but if you look carefully you'll notice the seconds on these two clocks are not changing at the same rate. Infact, the hardware clock was increasing by 2 seconds every cycle, while the system clock only increased 1 second.

I set up ntpd to sync the time, but this doesn't help because once the daemon sets the time, the system clock ticks too slowly and the time falls behind again. I also tried a Cronjob set to run rdate every 2 minutes but that really doesn't solve the problem either.

tickadj is not helping because it's only accepting a certian range of values (9000-11000) and the highest isn't good enough. If I step outside that range I get:
root@server [~]# tickadj 11500
adjtimex: Invalid argument
I just read about adjtimex could fix the problem but when I run the command I get:
root@server [~]# adjtimex
-bash: adjtimex: command not found
I really need to figure this problem out so I can get my server operational. Any Ideas?? IF you could help please...
Old 12-16-2006, 03:19 PM   #2
Registered: Apr 2002
Location: Ohio
Distribution: RedHat 7.3
Posts: 34

Original Poster
Rep: Reputation: 15
Update: I've got adjtimex installed finally. Now I'm trying to figure out how to get it to fix this issue for me or if I have to do all this dirty work myself.
Old 12-16-2006, 04:28 PM   #3
Registered: Apr 2005
Distribution: Ubuntu dapper(, Gentoo 2006.1 amd64(2.6.17-r8-custombuild)
Posts: 472
Blog Entries: 1

Rep: Reputation: 30
I thought ntpd managed how much the clock strayed and fixed that. Or I could be wrong. Make sure that adjtimex is the actual name
find / -name adjtimex -print
should find it.
Old 12-16-2006, 10:07 PM   #4
Registered: Apr 2002
Location: Ohio
Distribution: RedHat 7.3
Posts: 34

Original Poster
Rep: Reputation: 15
root@server[~]# find / -name adjtimex -print
So.... now what?
Old 12-17-2006, 06:21 AM   #5
Registered: Dec 2006
Location: Tailem Bend. South Australia
Distribution: Mandriva 2006
Posts: 124

Rep: Reputation: 15
Probably a bit out of left field, check your M/B BIOS battery. lots of lecky things run slow on sub-voltage. Although most modern M/B's will warn of this and also switch to auto config on boot
if the Flattery is bat.

good luck

regards shorty943.
Old 01-02-2007, 12:37 PM   #6
LQ Newbie
Registered: Nov 2006
Location: Pahrump, NV
Distribution: SuSE, Slackware
Posts: 15

Rep: Reputation: 0
add on cards?

I had a similar problem with my AMD64 box. Turned out I had a 33 MHz PCI video card in the 66 MHz bus. Changing the card solved the problem. I also had slow hard drive response which was fixed with new video card.
Old 01-02-2007, 02:43 PM   #7
Robert Diggs
Registered: Dec 2006
Location: Florida
Distribution: The ones that come in magazines and books.
Posts: 136

Rep: Reputation: 15
I'm with Shorty, change your BIOS battery. Usually a CR2032 battery. That's what it is in the States, anyway. Not sure of your location. That will fix it right up, I bet.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
Failed to set system clock to hardware clock jrtayloriv Linux - Newbie 2 09-25-2008 07:06 AM
system clock,hardware clock varunbihani Linux - Newbie 2 07-23-2005 09:04 AM
System clock is slow monkeyman2000 Linux - General 11 09-11-2004 11:40 PM
System clock is slow Hcman Linux - Hardware 6 10-21-2003 09:43 PM

All times are GMT -5. The time now is 01:38 AM.

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