LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-08-2006, 12:49 PM   #1
fungusamung
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
hwclock doesn't do anything


Hello,

Problem:
Nothing happens when running hwclock --show

Errors:
Nov 8 11:05:16 node set_rtc_mmss: can't update from 52 to 5

hwclock version:
hwclock from util-linux-2.12

I noticed that I was getting a lot of errors in my logs like this:
Nov 8 11:05:16 node set_rtc_mmss: can't update from 52 to 5

I have a script that synchronizes the hwclock with the system clock every day. So this messages is most likely being generated by the script trying to run. I noticed that this error is generated because hwclock will not update the hour (as it was intended to do).

I ran sudo /sbin/hwclock --show and got the time back once that reported the system time being off by a little more than a day. However, every subsequent attempt to run sudo /sbin/hwclock --show gives me nothing at all. No error message, no time, nothing. I can run sudo /sbin/hwclock --set --date="CurrentDate CurrentTime", but again nothing is returned confirming this operation completed successfully and I can't run --show to verify. Nothing is generated in the logs.

Does this sound like a failing CMOS battery to you guys or could it be something else? Any suggestions?

Thanks for the help
 
Old 11-08-2006, 01:38 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
An ordinary user is not supposed to run the hwclock utility (it's a root thing, thus sudo works).

It does sound a little like a failing battery if you get that much drift. Have you tried to set the time with ntpdate (as root)? Something like
Code:
ntpdate -v 0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org
might just do the trick.
 
Old 11-09-2006, 11:00 AM   #3
fungusamung
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Original Poster
Rep: Reputation: 0
ntpdate works fine. The system time is actually right because I am using ntp, but the script I mentioned before synchronizes the hwclock with the system time. I believe that is when the error is being generated, because the hwclock time is so far off from the system time. I tried running ntpdate again and then doing sudo hwclock --show and still nothing.
 
Old 11-09-2006, 02:37 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
After you set the time, run either hwclock --hctosys or hwclock --systohc. Either one will make the changes.
 
Old 11-09-2006, 05:29 PM   #5
fungusamung
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Original Poster
Rep: Reputation: 0
I've done that also.

The problem is that sudo /sbin/hwclock --show doesn't do anything, don't get an error message, don't get the time, or anything at all. I have several identical computers and the only ones that I'm getting the error message set_rtc_mmss: can't update from 52 to 5 are the ones in which sudo /sbin/hwclock --show does nothing. Hence, I'm thinking if I can solve the problem of the hwclock --show then I will fix the problem with the errors being generated.
 
Old 11-15-2006, 06:56 PM   #6
fungusamung
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Replacing CMOS batter fixed problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hwclock weirdness Peter Aleksic Linux - Software 2 12-13-2005 02:06 PM
hwclock problems =[ alphisb0t Linux - General 1 03-16-2005 09:43 PM
hwclock alaios Linux - General 1 11-02-2004 08:40 AM
hwclock - HTS Linux - Software 4 10-28-2004 02:21 AM
hwclock problem???? cancel_T Linux - General 2 08-02-2002 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration