LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-26-2009, 09:49 AM   #1
maxgsp
LQ Newbie
 
Registered: Jun 2004
Posts: 25

Rep: Reputation: 2
hardware clock time differs from system time after setting


I'm setting the hardware clock on RHEL 5.1 system using /sbin/hwclock --systohc. After setting the clock I issue a date command followed by a /sbin/hwclock --show from within a script to get fast resolution and I see that the hardware clock precedes the system time on average by .5 seconds. Does anyone have any idea why this would happen and how to fix it? I would think the clock should be identical after setting. thanks
 
Old 02-27-2009, 05:24 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
This might have something to do with the hwclock command waiting for a tick and not be a problem at all. To see what I am talking about:

Code:
hwclock --debug --show
(The --debug option is what most commands would call "verbose.")

I am not sure how you are determining it is, on average, 0.5 seconds behind since, TMK, the date command only has a resolution of 1 second. I do note that 0.5 seconds is the average of all possible values from 0 to 1 second.



EDIT: And please don't post the same question in more than one place. There is a reason that is against LQ rules ...

Last edited by blackhole54; 02-27-2009 at 05:35 AM.
 
  


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
hardware clock time differs from system time after setting maxgsp Linux - Software 2 02-28-2009 07:15 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - Networking 6 03-16-2007 07:14 PM
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 02:42 PM
Setting the system clock to a time server? orange400 Linux - General 4 06-13-2005 01:59 PM

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

All times are GMT -5. The time now is 06:26 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