LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-07-2006, 08:02 PM   #1
jptxs
LQ Newbie
 
Registered: Nov 2006
Posts: 7

Rep: Reputation: 0
system clock suddenly slow each night


I have a really odd problem. My clock on a box named bach loops over and over, advancing only 1-2 seconds for every 10-20. My prompt, which displays the time, shows the issue nicely:

08:02:18 jptxs@bach:~$
08:02:18 jptxs@bach:~$
08:02:19 jptxs@bach:~$
08:02:20 jptxs@bach:~$
08:02:20 jptxs@bach:~$
08:02:21 jptxs@bach:~$
08:02:21 jptxs@bach:~$
08:02:21 jptxs@bach:~$
08:02:22 jptxs@bach:~$
08:02:18 jptxs@bach:~$
08:02:18 jptxs@bach:~$
08:02:18 jptxs@bach:~$
08:02:19 jptxs@bach:~$
08:02:19 jptxs@bach:~$
08:02:20 jptxs@bach:~$
08:02:20 jptxs@bach:~$
08:02:20 jptxs@bach:~$
08:02:21 jptxs@bach:~$
08:02:21 jptxs@bach:~$
08:02:22 jptxs@bach:~$
08:02:22 jptxs@bach:~$
08:02:18 jptxs@bach:~$

Now, eventually, it will get to a point where it will move on a second. It would advance to 08:02:23 or maybe 24. But then it will skip back to 19 or 20 and start to loop for a bit again. I wrote a script to track it:

#!/bin/bash

while true
do
printf "harware clock says :: " >> clockChecks.log
hwclock >> clockChecks.log
echo >> clockChecks.log
printf "uptime is :: " >> clockChecks.log
uptime >> clockChecks.log
echo >> clockChecks.log
echo "bach clock:" >> clockChecks.log
date >> clockChecks.log
echo >> clockChecks.log
echo "wagner clock:" >> clockChecks.log
ssh wagner date >> clockChecks.log
echo >> clockChecks.log
echo ++++++---------------------++++++++ >> clockChecks.log
echo >> clockChecks.log
sleep 10
done

The output compares it to a working box named wagner as well as tracking uptime and hwclock output. I have posted a file [clockChecks.log] that shows the output at pastebin here: http://pastebin.com/819421, and latest now here: http://pastebin.com/820372. Now, what you can see is that they are in sync for quite a while. Here is some output from the most recent manifestation of the issue (updated to latest):

harware clock says :: Wed 08 Nov 2006 02:14:38 PM EST -0.563844 seconds

uptime is :: 14:14:39 up 1 day, 3:42, 2 users, load average: 0.00, 0.00, 0.00

bach clock:
Wed Nov 8 14:14:39 EST 2006

wagner clock:
Wed Nov 8 14:14:39 EST 2006

++++++---------------------++++++++

harware clock says :: Wed 08 Nov 2006 02:16:54 PM EST -0.967773 seconds

uptime is :: 14:14:53 up 1 day, 3:43, 2 users, load average: 0.00, 0.00, 0.00

bach clock:
Wed Nov 8 14:14:53 EST 2006

wagner clock:
Wed Nov 8 14:16:54 EST 2006

++++++---------------------++++++++

harware clock says :: Wed 08 Nov 2006 02:20:07 PM EST -0.079559 seconds

uptime is :: 14:15:03 up 1 day, 3:43, 2 users, load average: 0.00, 0.00, 0.00

bach clock:
Wed Nov 8 14:15:03 EST 2006

wagner clock:
Wed Nov 8 14:20:07 EST 2006


I ran ntpdate and the clock was reset, but immediately slowed down and looped again.

This gets stranger. This all started when I upgraded from a an old Debian install running kernel 2.20 with custom config to Ubuntu 6.06. For various reasons I needed a 2.6 kernel on the box. The box crawled. At that point, I didn't notice the clock issues. I installed over and over. I tried to go back to Debian Sarge. I tried a RedHat AS 3 set of disks I had and that wouldn't boot correctly (seemed like the init scripts were timing out). I finally settled on CentOS 4.4 (Server Disk for the install). That has gotten me to the point where I am now. It seemed to be running fine for 7-8 hours. I reinstalled the services I had had on the box (pdnsd: http://www.phys.uu.nl/~rombouts/pdnsd.html, ejabberd: http://ejabberd.jabber.ru/ and VMWare Server: http://www.vmware.com/products/server/ running an OpenBSD guest OS). Everything seemed fine, but then the clock started going funny again after a few hours more operations. So I searched and searched. I found a ton of stuff about XBox clock skips and loops, but nothing I could find seemed relevant to me. I upgraded my BIOS (http://www-307.ibm.com/pc/support/si...id=MIGR-42952). After that reboot things seemed to be fine again for a bit. That's when I wrote the script to track it. I thought I'd licked it. Bu then the above unfolded and now I'm here begging for help.

Things I have tried:
- upgraded BIOS
- replaced battery on MB
- reset the RTC clock
- ran without VMWare up (to eliminate vmmon, which was suspect to me at one point)
- ran in single user mode

Other info:
- ps -ef :: http://pastebin.com/819423
- cat /proc/interrupts|grep 8\: \ 8: 2207 IO-APIC-edge rtc
- dmidecode output :: http://pastebin.com/819410
- uname -a \ Linux bach 2.6.9-42.EL #1 Sat Aug 12 09:17:58 CDT 2006 i686 i686 i386 GNU/Linux

The problem eventually manifested in every case I tried. I have also found there seems to be no real tie in to time of day (though it has always happened after 9pm regardless of uptime) and that a reboot always seems to fix it for a while, though the amount of uptime that passes has varied from 4-7 hours.

Could this be hardware? Seems too inconsistent for that, in my mind.

How, if at all, could this be somehow be a relationship to the wagner box? It seemed to go out of whack when that went offline. But it was a 100% fresh install in a few cases and still had this issue.

I didn't see any errors in /var/log/messages or other logs at that time, either.

Could this be some odd thing I'm just not seeing?

Any suggestions for search terms? I've tried "clock skip" "clock loop" and all sorts of system indicators (kernel: Linux bach 2.6.9-42.EL #1 Sat Aug 12 09:17:58 CDT 2006 i686 i686 i386 GNU/Linux, model: info in dmidecode output above).

Anything I'm just plain missing?

Any help appreciated...

jptxs

Last edited by jptxs; 11-09-2006 at 07:07 AM.
 
Old 11-08-2006, 04:32 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: FC11 2.6.29.4-167.fc11.i686.PAE
Posts: 1,370

Rep: Reputation: 69
Yikes - you've pretty much done exactly everything I could think of that one could do with regard to this.

The only tip I might be able to offer is that I have experienced severe clock skew under high system loads a few times. Under my 2.6.9 kernel under FC3 this wasn't so apparent, but under my new 2.6.14.3 kernel (new to me) this is quite evident under high load. If I have a load average of about 2, it seems to loose 2 minutes a week, if the load average doubles, the clock skew seems to advance at a proportional rate.

In summary thus, (just maybe, but you seem to be clutching at straws already) - you can try looking at something starting up after two or three hours on the bach system that uses a lot of CPU time....?

A shot in the dark, and my problem does not have a looping clock associated with it, just severe skew under load...
 
Old 11-09-2006, 06:46 AM   #3
jptxs
LQ Newbie
 
Registered: Nov 2006
Posts: 7

Original Poster
Rep: Reputation: 0
rylan76, the latest script includes uptime and the load comes along with that. the highest the loads ever reach is .06 at any point. and the highest load peak did not correlate to the problem occurring... I'm going to update pastebin with the latest now.

But thanks for the thought =]
 
Old 11-23-2006, 01:17 PM   #4
caddr
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
I had same problem

Look at this:

On Tue, 2006-04-04 at 11:58 +0100, Will McDonald wrote:
> On 04/04/06, Gary Hodder <vk2kcf at vk2kcf.com> wrote:
> > Hi all,
> > is there a fix for the clock running slow on Centos 4.3, it looks to be
> > running at about 25 to 30% of its normal speed.
>
> Is it just the CMOS battery running down?
>
> You could run NTPD to keep the system clock up to date. It might also
> be worth checking old threads on the subject.
>
> e.g. lists.centos.org/pipermail/centos/2006-February/thread.html#60641
>
Thanks for the quick reply Will.
The link sparked up the antimatter between the ears.
noapic nolapic in the grub kernel options fixed it.

Thanks
Gary.


The item I used to fix my IBM NetVista P4 systems (2) was to add "clock=pmtmr" to the boot kernel line.
 
Old 12-30-2006, 07:27 PM   #5
davidwindt
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
Dear jptxs: Did you ever find a fix to the weird looping clock problem you described? I just installed CentOS 4.4 on a machine that seems to be showing the exact same problem - it's fine for a few hours after reboot, then the clock gets weird and the system effectively grinds to a halt. I'd be very grateful to know what solution you may have found.

Thanks in advance.
 
Old 12-31-2006, 06:57 AM   #6
jptxs
LQ Newbie
 
Registered: Nov 2006
Posts: 7

Original Poster
Rep: Reputation: 0
RESOLVED(?) system clock suddenly slow each night

Quote:
Originally Posted by davidwindt
Dear jptxs: Did you ever find a fix to the weird looping clock problem you described? I just installed CentOS 4.4 on a machine that seems to be showing the exact same problem - it's fine for a few hours after reboot, then the clock gets weird and the system effectively grinds to a halt. I'd be very grateful to know what solution you may have found.

Thanks in advance.
You'll find your answer here:

http://www.centos.org/modules/newbb/...forumpost18103
 
Old 12-31-2006, 09:12 AM   #7
davidwindt
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
Unfortunately it seems that the links showing the kernel configs are no longer working. Can you possibly post the info again?

Thank you.

Quote:
Originally Posted by jptxs
 
Old 01-01-2007, 07:53 AM   #8
jptxs
LQ Newbie
 
Registered: Nov 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Seems the links went dead. Here are new ones:

Old: http://pastebin.com/848942

New: http://pastebin.com/848945

HTH

New links also here: http://www.centos.org/modules/newbb/...forumpost19763
 
Old 01-01-2007, 09:32 AM   #9
caddr
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
I was wrong in my previous post. The fix to both of my systems (without recompiling the kernel) was to add the following to the kernel boot parameters:

clock=pit noapic nolapic

Both have been running on time.
This is not to say that the kernel is not a problem, it just is a quick fix.
 
Old 01-01-2007, 01:11 PM   #10
davidwindt
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
I've tried adding "noapic nolapic" to the kernel options as well...I've had two machines running for more than 24hrs now without trouble. (I did not add any "clock=xxx" keys.) Both machines had previously gone screwy after 6-8 hrs. So, so far so good...

If this quick/simple fix does the trick, is there any reason to recompile the kernel? i.e., is there something else I'm missing?



Quote:
Originally Posted by caddr
I was wrong in my previous post. The fix to both of my systems (without recompiling the kernel) was to add the following to the kernel boot parameters:

clock=pit noapic nolapic

Both have been running on time.
This is not to say that the kernel is not a problem, it just is a quick fix.
 
Old 01-05-2007, 04:56 PM   #11
davidwindt
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
Just to follow up: I've reinstalled CentOS 4.4 using the "i586" option when running the install program. I've installed it this way on several machines now, and the weird clock problem has not occurred, and I have not passed the "noapic nolapic" options to the kernel boot line. So I think this may be the solution.

I do see another 'weird' problem, however, on every single machine I've upgraded (both those installed using "i586" as above and the original machines installed using the default, and using "noapic nolapic"): a few minutes after boot, the system seems to freeze for about 7 minutes, but then it works fine. I have no idea what's going on during those seven minutes - it's not accessing the disk, and I don't see excessive IP activity. After that it's fine; I've had machines running for a couple days now without any subsequent problems. As I said, this happens on all the machines I've upgraded (which had all previously been running Redhat 8 without this problem.) All the machines are IBM Netvista's or ThinkCentre's with Pentium chips, though no two machines are exactly the same in terms of clock speed, memory, disk, etc etc.

Anyone have any idea what's going on with that?

And finally, on a totally different topic, but still related to CentOS 4.4 at least: audio does not work on any of these systems! The OS finds the sound card no problem, but there's no sound. By any chance does anyone know why?
 
Old 01-06-2007, 03:56 PM   #12
caddr
LQ Newbie
 
Registered: Nov 2006
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by davidwindt
All the machines are IBM Netvista's or ThinkCentre's with Pentium chips, though no two machines are exactly the same in terms of clock speed, memory, disk, etc etc.
Wow, strange!

The two systems that were giving me problems are Netvistas. The third Netvista is not, because I've been lazy and not upgraded it from FC2 to Centos4.4.

The soundcards are detected and sound is played. Wish I could help with the sound.

Are any of them available to boot off of a knoppix livecd? That way you can see if is hardware or the OS.
 
Old 01-06-2007, 07:46 PM   #13
davidwindt
LQ Newbie
 
Registered: Oct 2006
Posts: 7

Rep: Reputation: 0
OK, I spoke too soon: now the machines installed using "i586" are having the clock problem too. Crap! So much for that solution! Sorry...

The weird 7 minute freeze is still occuring no matter what, though.

As for the sound, well, I haven't tried knoppix, but sound was working under Redhat 8...


Quote:
Originally Posted by caddr
Wow, strange!

The two systems that were giving me problems are Netvistas. The third Netvista is not, because I've been lazy and not upgraded it from FC2 to Centos4.4.

The soundcards are detected and sound is played. Wish I could help with the sound.

Are any of them available to boot off of a knoppix livecd? That way you can see if is hardware or the OS.
 
  


Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System Clock slow Suse 10.0 davidhilbert Linux - General 2 04-29-2006 04:04 PM
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
System clock is fast AND slow.... cbjhawks Linux - Hardware 1 09-10-2003 03:24 PM
System clock is fast AND slow.... cbjhawks Linux - Software 2 09-10-2003 03:03 PM


All times are GMT -5. The time now is 09:28 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration