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.

  • Thanks, giving that a try. I am puzzled though that it keeps time correctly for a random period of, uh, time. – originalgeek Sep 15 '09 at 3: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 3:44
  • No, it's not. And NTP didn't solve the problem either. – originalgeek Sep 16 '09 at 5:16
  • Can you post the output of dmesg? That may show any problems with clock frequencies etc. – Kamil Kisiel Oct 5 '09 at 21:31

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

  • You can also set a cron job to sync the clocks to your favourite NTP server. – sybreon Sep 15 '09 at 1:41
  • 3
    Running 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 1:44

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.