LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Slow system clock and stray hardware clock, pleas help! (https://www.linuxquestions.org/questions/linux-general-1/slow-system-clock-and-stray-hardware-clock-pleas-help-511142/)

Epox 12-16-2006 02:32 PM

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:
Quote:

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:
Quote:

root@server [~]# tickadj 11500
adjtimex: Invalid argument
I just read about adjtimex could fix the problem but when I run the command I get:
Quote:

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...

Epox 12-16-2006 03:19 PM

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.

Samoth 12-16-2006 04:28 PM

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
Code:

find / -name adjtimex -print
should find it.

Epox 12-16-2006 10:07 PM

Quote:

root@server[~]# find / -name adjtimex -print
/sbin/adjtimex
So.... now what?

shorty943 12-17-2006 06:21 AM

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.

jerrydr 01-02-2007 12:37 PM

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.

Robert Diggs 01-02-2007 02:43 PM

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.

Regards,

Brandon


All times are GMT -5. The time now is 03:00 PM.