my server’s time keeps getting out of whack. occasionally - I’d say once every couple months - it’ll jump ahead or behind hours, days, or sometimes months. ntpd doesn’t seem to be keeping things in sync. Since this first happened last Thanksgiving, DreamHost has been unable to fix the problem It happened again a couple days ago, and I submitted a ticket, but haven’t heard a reply yet, so I started to muck around on-line to look for time-based commands and see if I could at least confirm if this was a hardware or software problem, since DH keeps insisting it was hardware, but I was not convinced.
I learned today that Linux keeps time separately from the hardware. I never knew that. Apparently Linux only checks up on the hardware time upon shut down and start up. This turned out to be handy in diagnosing the problem:
reports the time that the computer hardware has, and it reported that the hardware clock is on-time. well, it’s actually 5 minutes ahead, but not a week behind, as the linux clock:
proved to be. I used hwclock --hctosys to copy the hardware time to the OS time. this was fine and well for about 15 minutes, after which point the OS now reports a time about 1 and a half hours in the future, while the hardware clock is still reporting the real (5 minute-off >_>) time.
When this problem first came up, DreamHost attempted to solve it by moving to new hardware. Since it continued, I knew it was unlikely hardware, but DH insisted that this kind of problem was not uncommon (which I didn’t buy :P), and attempted to solve the problem by increasing the frequency of ntpd syncs. This never solved the problem, and I’ve complained about it with the only effect being yet another increase in ntpd sync frequency.
I tried to look at the options for the ntpd program by running:
but I’m told “command not found”… I find it hard to believe that ntpd isn’t installed, so I poked around on-line to see if maybe I needed to also specify a path. I couldn’t find anything, but I did noted, on wikipedia, that there should be a /var/log/ntp.log file. This file does not seem to exist on my server. Is it possible I really don’t have ntpd? Even if I don’t, however, that does not explain to me why the server time is jumping around like this.
I’m hoping someone else has some ideas about what’s causing this. My Linux knowledge is very far from complete - when it comes to command-lines, I still love DOS - and so I’m sure I’m missing some basic information that might help me figure out this stupid problem once and for all. Logs I can check, other useful programs, etc.
Thanks for any help.