New IT forum
27 June 2022, 10:59:48 am *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
 
Pages: [1]

Author Topic: Hardware Clock Drift?  (Read 5792 times)

apemberton

  • Full Member
  • ***
  • Posts: 187
Hardware Clock Drift?
« on: 27 August 2012, 01:09:13 pm »

I have noticed that my Sheevaplugs and Guruplugs System Clock and Hardware clocks gradually drift over time and I'm wondering if this is causing some disk problems or update failures. The System clock is updated by ntp so is locked to the time standards but the hardware clock creeps over long periods to several minutes difference to the System clock. I use 'hwclock -r' and 'date' to show the difference.

Although probably unrelated, I have had serious problems when the System clock (for unknown reasons) shows some date in 1938 or 1941 (ntp won't start and gives bad date stamps on the disks).

To tackle drift, I have modified /etc/cron.daily/ntp to include the following lines:-

Code: [Select]
# Resynchronise the hardware clock daily to compensate for drift

hwclock --systohc


Is this a good idea?
Logged
Tony Pemberton

tennnn

  • Newbie
  • *
  • Posts: 2
Re: Hardware Clock Drift?
« Reply #1 on: 08 February 2014, 08:32:42 am »

I'm very pleased to have been about it.
Logged

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Hardware Clock Drift?
« Reply #2 on: 08 February 2014, 02:56:28 pm »

Quote
I have had serious problems when the System clock (for unknown reasons) shows some date in 1938 or 1941
Check the battery, mine only seem to last for about three years until they need replacing.


Quote
To tackle drift, I have modified /etc/cron.daily/ntp to include the following lines:-

Code:
Code: [Select]
# Resynchronise the hardware clock daily to compensate for drift

hwclock --systohc

Is this a good idea?

Perfectly acceptable and correct IMHO, but be aware that any future update to the ntp package may result in the loss of your changes and you may have to re-edit the file.
I cannot say for sure as it is dependant on the way the package is updated, you will just have to remember to check.



Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!

apemberton

  • Full Member
  • ***
  • Posts: 187
Re: Hardware Clock Drift?
« Reply #3 on: 08 February 2014, 07:54:25 pm »

Errmmm.....

This post was hit by a spammer! My original post was in August 2012 and was left to rot! Anyway, the battery was replaced which fixed the problem.
Logged
Tony Pemberton

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Hardware Clock Drift?
« Reply #4 on: 08 February 2014, 08:35:10 pm »

Yes I missed it back then, I answer when I can so that those that DO bother to search before posting can be saved repeating the question and having to wait.
Thanks for confirming the battery renewal.
« Last Edit: 08 February 2014, 09:15:56 pm by Confusticated »
Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!