[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getting sysclock to match hwclock



>> On 25 Oct 1999, Patrik Magnusson wrote:
>> > My system clock has been keeping time rather poorly. The
>> > hardware-clock on the other hand hasn't lost a second in
>> > over two months. 
>> > 
>> > I tried to use adjtimex to get the system clock to match the 
>> > hardware clock, unsuccessfully. First i tried adjtimex --adjust
>> > resulting in the system clock losing more than five minutes in 
>> > a day. Then I tried adjtimex -u --adjust, resulting in the
>> > system clock losing 20 minutes a day.
>> > 
>> > I just want the system clock to match the hardware clock.
>> > Please help.

>> hwclock --hctosys
>>  or, if you're on UTC:
>> 
>> hwclock --utc --hctosys.
>> 
>> However, the error will come back unless you use adjtimex to correct it.
>> You can do this in /etc/rc.boot/adjtimex.
>> 
>> See the man pages for hwclock and adjtimex for details of all this.

(Thank you A. Campbell)

I see now that I was unclear in my original message. I do know about
hwclock --hctosys. 
I was under the impression (I still am) that it's a bad thing to just set the system 
clock back. Instead you should get it to run slower (or faster - I don't see
how it could be harmful to set the system clock ahead though -) until it matches
the hardware clock, and then get it to run at 'normal' speed again.
Is this correct?
If it is, is there some switch that makes adjtimex do this, or some other tool?
And yes, I have read the man page for adjtimex, it's just that most of it is 
undecipherable to me.

/Patrik.



Reply to: