I’ve been doing some troubleshooting of some RHEL5 servers recently around it’s timekeeping. Specifically, after configuring NTP some of the server would jump 8 hours around 17:00hrs. In this case, it seems the cause is VMWARE upon which these servers reside, and a change by the VMWARE guy should fix this. However, here are some notes for stuff I learned (TIL).

/etc/localtime can be symbolically linked to your applicable timezone, for example;

ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime

The hwclock command can be used to check/adjust the hardware clock.

You can add the “divider=10” kernel parameter to slow down any rate of clock loss using the following command;

grubby --update-kernel=ALL --args=ʺdivider=10ʺ

To update the clock more frequently if there are issues that cannot be resolved immediately use the following crontab entry;

10 * * * * ntpdate -q ntpserver

This, of course, assumes your NTP is setup correctly.

/sys/devices/system/clocksource/clocksource0/current_clocksource shows info on the current clock source being used.

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation