Click to See Complete Forum and Search --> : Why do I keep losing time?
trilarian
11-11-2003, 04:12 AM
Is that subject better?? jeez, anyway here is the original post that got booted.
Hey, got a weird problem here. For some reason, I seem to be losing time on my computer. I'll boot and run ntpdate to get a time update and all seems to be fine. I'll sit down the next night and my computer has seemed to lose an hour or so. I have a dual boot, but thats not the prob. This happens when linux stays booted by itself. Any ideas? I can set cron to update so often but I'm curious to what is making the timer lose time. And if I did set cron to do it, how do I get cron to execute ntpdate as root? Thanks.
GaryJones32
11-12-2003, 03:01 PM
yea that was a weird thread stop ????
moderator must be having a bad day...
so i was trying to answer before -- don't know if you saw??
This is some kind of a kernel problem
if the time just just get's messed up on start/reboot it's the BIOS clock
keeping bad time like they do..
it's possible to write time out to the BIOS on shutdown so the
bios clock doesn't get way behind.
anyway back to what you said about the system clock running slow
if it's the system time (while the system is up) time is deteriorating
the kernel keeps time using cpu cycles and should be / is usually very accurate
the kernel version you are using might have a bug for your chipset
or something is bogging down your kernel bad..
possibly a missconfigured device ??
possibly when you play a music cd ??
Try running:
procinfo -n1
and having a look at the irq
listings --
timer should be keeping good time for you to see there
maybe one of them besides the timer (irq 0) will be rising rapidly(changing), indictaing a lot
of interrupts and interupting the time.
you can try running procinfo -n1 while a cd is playing to see if the cd
driver has the bug.
possibly kernel upgrade is in order ????
Homer119
11-12-2003, 05:22 PM
is the clock losing an hr excatly? if it is maybe its updating its self in a different time zone. r u have same problem in windows or other OS?if so it might be bios check, is it an old comp, replacing ur bios back up battery might be the issue
Darksamurai
11-12-2003, 05:28 PM
sounds like ya need to replace your CMOS battery. Cheap fix usually.
On your motherboard, it's the little silver disc that looks like a big watch battery. Should solve all yer woes.
dalek
11-13-2003, 07:18 AM
My rig is fairly new and I lose time too. It's just a little at a time. It is weird. Maybe someone will come up with something.
Later
:D :D :D
hard candy
11-13-2003, 08:13 AM
Go to the ntp (http://www.ntp.org/) site, look through the docs. Make sure your bios clock and software clock are set to the same time zone. When you shut down, the software clock sync's with the bios clock. If they are different, the software clock will adjust itself incrementally to keep from messing up some programs, if it made a big jump there are some programs which would seg fault. Here's a howto:
Linux Clock Mini-HOWTO (http://www.tldp.org/HOWTO/Clock-2.html#ss2.2)
dalek
11-13-2003, 10:35 AM
Mine will change even though I have not rebooted. It is usually about 5 minutes or so off. I did check the BIOS though. It seems to be working at the moment but you never can tell. :rolleyes:
It is weird though. It's not consistant, that is really strange. Don't know about the original poster but I have the kernel 2.4.21-0.13mdk on my rig. Wonder what he has?
Later
:D :D :D
hard candy
11-13-2003, 10:54 AM
Mine was from 10 to 60 minutes at the end of the day until I enabled the ntpd. It's probably overkill but I do have the correct time now.
Satanic Atheist
11-13-2003, 12:31 PM
I had the same problem with an old motherboard that I had and was using on the server. This was a long time ago, so I can't remember the exact cause of the problem, but... I think it was the time that went screwy after I turned the machine off and back on. Whilst it was running it was fine. This sounds like the opposite of your problem and therefore I don't think that your CMOS battery is knackered.
I'm guessing that it could be to do with throttle-duty cycling and power management, but that's just a hunch.
Since I have an always on Broadband link, I have set up ntpdate to run every 30 minutes to update the time for ntp0.strath.ac.uk (closest timeserver). If I remember correctly, you can do the following to create a file (as root) and load it into cron:
> touch root.ct
> cat root.ct << "EOF"
> # Root's crontab file
> # This entry will update the system clock every 30 minutes
> 0,30 * * * * ntpdate ntp0.strath.ac.uk 2> /dev/null
> EOF
> crontab root.ct
This should sort it, but check back here later after I check my own root.ct file. What happens to me is that if the net connection is not available or a reply is not received from the remote time-server, I get an error e-mail. If it works fine, I receive nothing (best way to be - 48 e-mails a day is not nice!).
You could also create a script to test for a net connection in the first place and if it's there, then run the update, otherwise abort.
I believe you could have it update every 5 minutes with "*/5" instead of "0,30" if you so require, but I'd only recommend this if you have serious time problems.
James
dalek
11-13-2003, 06:00 PM
I'm on dial-up. :( :( :(
<<<< somebody hand me a snot rag. It's been a rough day. >>>>>>
:D :D
I say start with the simplest thing first: check your BIOS clock. I have had similar problems. When you boot-up it starts with the BIOS's time. Then if you use NTP it gets the correct time. When you shutdown and boot-up again it goes back to your BIOS clock.
ehawk
11-13-2003, 07:16 PM
Your computer is being abducted by aliens. Check for implantation of small metal beads and bars. Also note the strange appearance of mutilated digital watches. Try applying linear regression models to see if your computer can remember the incidents.
sharth
11-13-2003, 07:34 PM
I'm also going to suggest the cmos battery...
use ntp though to make it simple to keep it correct for a software solution.
janne_oksanen
11-25-2003, 06:07 AM
My old RH9 system started losing 30-60 min a day when I used the BSOD screensaver. After I changed that everything was fine. Go figure...
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.