I have a linux box, running Fedora Core 10, and the clock gets screwy after a few days of uptime. It keeps time just as one would expect, but then I notice the timestamps on incoming email are from the recent past. I log in to the machine, and if I run the date command repeatedly every 1 second (more or less), it takes 4-10 seconds for the output from date to change by 1 second.
Asked
Active
Viewed 307 times
1
-
Thanks, giving that a try. I am puzzled though that it keeps time correctly for a random period of, uh, time. – Sep 15 '09 at 03:04
-
is this system running under any kind of virtualization, such as xen or vmware? that can greatly affect what time/clock issues you experience, and the best solutions. – jeff Sep 15 '09 at 03:44
-
No, it's not. And NTP didn't solve the problem either. – Sep 16 '09 at 05:16
-
Can you post the output of dmesg? That may show any problems with clock frequencies etc. – Kamil Kisiel Oct 05 '09 at 21:31
2 Answers
6
Your system's clock is running slow. Run NTP on the machine, and it will be fine. I've had good experiences with chrony.
Since running NTP by itself didn't fix things, you should investigate whether your system's power source and the supply hardware are in good condition. An unusual ripple on that could cause weirdness. A dying CMOS battery could also cause the slowdown effect you're seeing, though I don't usually expect that on a system that's powered on (normally, it would lose time while off).

Phil Miller
- 1,755
- 1
- 12
- 17
-
You can also set a cron job to sync the clocks to your favourite NTP server. – sybreon Sep 15 '09 at 01:41
-
3Running a cron job to sync the clock is exactly poor the approach that NTP was invented to replace. That approach would jump the clock every time interval, and run slow otherwise. Events would appear to 'bunch' in time around the syncs. – Phil Miller Sep 15 '09 at 01:44
0
I'm using sync_date_time.sh from http://quamis.evonet.ro/new/index.php/path=Proiecte_Proiectevechi_System_scripts.html from time to time on a sistem that drifts about 5 seconds a week, but NTP is better than that:)

quamis
- 362
- 7
- 18