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