f



kenel sets sys clock from hardware clock??

Can anybody confirm that the kernel, itself, updates the system clock
from the hardware clock when loading? (Fedora Core 4, kernel 2.6.11)

Even if I eliminate the entire boot process (no init process, no
rc.sysinit, no init scripts, nothing beyond the kernel and shell),
when I check the system clock ("date" command) it reflects the
hardware clock value shown in bios/setup. (I bypass the boot process
by passing "init=/bin/bash" to the kernel via the bootloader.)

rc.sysinit script is usually viewed as holding the role of applying
hardware time to the system clock  but its effort seems redundant
since the kernel takes care of it anyway. Everybody talks about
rc.sysinit setting the clock, but never a mention of the kernel's
doing so.

Am I  interpreting my observation right? Any critiques or insights
appreciated.
0
5/19/2006 5:53:12 AM
comp.os.linux.misc 33599 articles. 1 followers. amosa69 (78) is leader. Post Follow

2 Replies
677 Views

Similar Articles

[PageSpeed] 9

On Thu, 18 May 2006 22:53:12 -0700, david 
  <taihaiteki@dslextreme.com> wrote:
> Can anybody confirm that the kernel, itself, updates the system clock
> from the hardware clock when loading? (Fedora Core 4, kernel 2.6.11)
>
> Even if I eliminate the entire boot process (no init process, no
> rc.sysinit, no init scripts, nothing beyond the kernel and shell),
> when I check the system clock ("date" command) it reflects the
> hardware clock value shown in bios/setup. (I bypass the boot process
> by passing "init=/bin/bash" to the kernel via the bootloader.)
>
> rc.sysinit script is usually viewed as holding the role of applying
> hardware time to the system clock  but its effort seems redundant
> since the kernel takes care of it anyway. Everybody talks about
> rc.sysinit setting the clock, but never a mention of the kernel's
> doing so.
>
Perhaps in some non-PC architectures the kernel doesn't read the 
hardware clock.  Also, if a PC has a broken hardware clock, or a more 
accurate time source is available, the script can be modified.


0
bmarcum (964)
5/19/2006 5:40:33 PM
In article <hhc1k3-1ui.ln1@don.localnet>,
Bill Marcum  <bmarcum@iglou.com> wrote:
:On Thu, 18 May 2006 22:53:12 -0700, david 
:  <taihaiteki@dslextreme.com> wrote:
:> Can anybody confirm that the kernel, itself, updates the system clock
:> from the hardware clock when loading? (Fedora Core 4, kernel 2.6.11)
:>
:> Even if I eliminate the entire boot process (no init process, no
:> rc.sysinit, no init scripts, nothing beyond the kernel and shell),
:> when I check the system clock ("date" command) it reflects the
:> hardware clock value shown in bios/setup. (I bypass the boot process
:> by passing "init=/bin/bash" to the kernel via the bootloader.)
:>
:> rc.sysinit script is usually viewed as holding the role of applying
:> hardware time to the system clock  but its effort seems redundant
:> since the kernel takes care of it anyway. Everybody talks about
:> rc.sysinit setting the clock, but never a mention of the kernel's
:> doing so.
:>
:Perhaps in some non-PC architectures the kernel doesn't read the 
:hardware clock.  Also, if a PC has a broken hardware clock, or a more 
:accurate time source is available, the script can be modified.

Also, when the kernel first sets the system time from the hardware clock
the local time zone is not yet known.  That's not a problem if the
hardware clock is UTC, but if the hardware clock keeps local time then
you need rc.sysinit to set the system time in accordance with the TZ
offset rules in /etc/localtime.

-- 
Bob Nichols         AT comcast.net I am "RNichols42"
0
5/20/2006 1:16:45 AM
Reply:

Similar Artilces:

Hardware clock vs. software clock
Greetings, After my little job ran to address the return to standard time, the software clock was off by about 8 hours. =20 I rebooted, and ran CLKUTIL to set the hardware clock. After starting the system from ISL, the software clock asked if it was October 1. After a couple more reboots I determined that the two clocks were off by 30 days. =20 My bottom line was to get the software clock correct, since it is what stamps the jobs, sessions, file creations and such. This has been an issue for a couple of years, but the two clocks seem to be getting farther and farther apart....

software clock better than hardware clock
I was playing around with interrupts to find different uses for interrupts.= One of the big questions I wanted to answer was, how much processing powe= r does a computer use to update the seconds of a clock and display it on th= e screen, and how much time is left until the next interrupt comes from the= next second. On a IIGS there is a one-second interrupt register, that initiates an inter= rupt, well, you guessed it, every second. But the standard way would be to read the clock, do some math to convert th= e returned digits to screen digits, then display them to the screen. The reading of the clock and converting the numbers to screen digits take a= very long time in computer time. A much simpler method and uses far less processing power is to use software= to keep track of the seconds and minutes, then read the real clock once th= e clock strikes on the hour. For computers without clocks, the house is up= dated by software and the clock read is ignored. A very simple routine that has each digit already converted to a screen cha= racter but also counts from 0 to 9 looks like this: *One Second Interrupt points to here SED CLC LDA ONESECDIG ; ones digit of the seconds ADC #1 AND #$F STA ONESECDIG BEQ SECTENS ; tens digit of the seconds ORA #$B0 STA $426 CLD RTS ; if only the ones digit is updated, we are already finished ; you can see how this is a far cry of way fewer cycles than from readi= ng f...

System clock is much faster than hardware clock
Hi all, The system clock on my updated SuSE 9.3 is running several times faster than it should on my eMachine. Does anyone know how I can fix it? Thanks. On Saturday 08 October 2005 16:58, rsina stood up and spoke the following words to the masses in /comp.os.linux.misc...:/ > Hi all, > > The system clock on my updated SuSE 9.3 is running several times > faster than it should on my eMachine. Does anyone know how I can fix > it? Try adding *no_timer_check=0" to the /append/ line for your kernel, and if that doesn't help, disable /acpi/ support - *acpi=off* - in th...

Setting The System Clock [Linux]
As root: date --set='-1 hours' :-) -- Alan C Post validation at http://tinyurl.com/rv0y Alan Connor <zzzzzz@xxx.yyy> wrote: > As root: > date --set='-1 hours' Not needed if you use ntp to sync your system clock. In addition, don't forget to sync the BIOS clock: man hwclock ;) -- Michael Heiming Remove +SIGNS and www. if you expect an answer, sorry for inconvenience, but I get tons of SPAM Michael Heiming wrote: > Alan Connor <zzzzzz@xxx.yyy> wrote: >> As root: >> date --set='-1 hours' > Not needed if you use ntp to sync your system clock. > In addition, don't forget to sync the BIOS clock: > man hwclock Heh that's funny, I woke up this morning and it [something in Debian] had changed the clock automagically. alexd -- <http://alexd.mine.nu/> (AIM:troffasky) (gebssnfxl@ubgznvy.pbz) 10:08:12 up 28 days, 18:16, 1 user, load average: 0.02, 0.09, 0.08 I feel you, I want you, I know your touch is all I need, I'm waiting, you're shining On Sun, 26 Oct 2003 10:45:41 +0100, Michael Heiming <michael+USENET@www.heiming.de> wrote: > > > Alan Connor <zzzzzz@xxx.yyy> wrote: > >> As root: > >> date --set='-1 hours' > > Not needed if you use ntp to sync your system clock. > > In addition, don't forget to sync the BIOS clock: > > man hwclock > > ;) > > -- > Michael Heiming > &g...

setting the hardware clock from ruby
Anybody happen to know if there is a platform independent way of setting the hardware clock from ruby? I'm primarily interested in Windows at the moment (for a port of some QNX code), so it can probably be done with Win32API (or Ruby/DL, now). I didn't find much under "clock" on ruby talk or "ruby set clock" on google. Any suggestions appreciated... Joel VanderWerf wrote: > > Anybody happen to know if there is a platform independent way of setting > the hardware clock from ruby? I'm primarily interested in Windows at the > moment (for a po...

Command to set hardware clock
Dear OpenBSDers, today I pulled out a spare laptop (running OBSD, natch) that's not been booted yet this year and discovered that the hardware (BIOS, CMOS, whatever) clock has lost a few days. On this machine I cannot set the clock from the BIOS, it must be done by the OS. Various Linux distros have "hwclock" but is there a command to do this in OpenBSD?? Google is as useless as ever, the man pages at openbsd.org list several kernel interface commands, but is there a shell command in OpenBSD that saves the system clock settings for date and time to the hardware clock? -- mark south: world citizen, net denizen echo znexfbhgu2000@lnubb.pb.hx|tr a-z n-za-m "Take it? I can't even parse it!" - Kibo, in ARK On 2006-01-16, Mark South <mark.south@null.invalid> wrote: > Various Linux distros have "hwclock" but is there a command to do this in > OpenBSD?? Google is as useless as ever, the man pages at openbsd.org list > several kernel interface commands, but is there a shell command in OpenBSD > that saves the system clock settings for date and time to the hardware > clock? I would think that the NTPD daemon itself has access to the hardware clock, as well as the rdate command. Both set my hardware clock and it sticks. ;) I believe there is a configuration stub in /etc/rc.conf where you can stick in parameters for rdate to have it set the clock upon boot after rdate contacts a time server...

Please recommend CPU/core clock and System/bus clock setting of ARM926EJ-S
I am studying 'ARM926EJ-S'. I want to know regular set to CPU and bus clock of 'ARM926EJ-S' which can always work reliably. If who knows that or have data/document, please tell me. Thanks. Have fun. And, Good luck. ...

Doomsday clock (XGA clocks)
Um, how do the various oscillators on the XGA interplay to set frequencies? In the tech ref, there is CLK1 and CLK2 (plus the possibility of ANOTHER clock over the AVE!). U44 40.0000 MHz DMA Clock / 2 (not involved in video?) U45 44.9000 MHz Pixelclock 1024x768, 43.5Hz I (8514/A) mode U46 28.3220 MHz VGA / Text mode U47 41.5390 MHz Pixelclock 132-colums mode U48 25.1750 MHz Pixelclock 640 x 480 / 400 modes Louis Ohland wrote: > Um, how do the various oscillators on the XGA interplay to set > frequencies? In the tech ref, there is CLK1 and CLK2 (plus the > possibility of ANOTHER clock over the AVE!). > > U44 40.0000 MHz DMA Clock / 2 (not involved in video?) > > U45 44.9000 MHz Pixelclock 1024x768, 43.5Hz I (8514/A) mode > U46 28.3220 MHz VGA / Text mode > U47 41.5390 MHz Pixelclock 132-colums mode > U48 25.1750 MHz Pixelclock 640 x 480 / 400 modes Pages 3-88 and 3-89 http://www.mcamafia.de/pdf/ibm_vgaxga_trm3.pdf PCS - Programmable Clock Select CS1 - Clock Select 1 CS2 - Clock Select 2 VCS - Video Clock Scale - controls the divide ratio of the selected video clock before it is used by the CRT controller PCS | CS2 | CS1 | Selected Clock (bin) |(bin) |(bin) | -------------------------------------------------- 0 | 0 | 0 0 | VGA 8-PEL Char Mode / 640x480 Graphics Mode Clock 0 | 0 | 0 1 | VGA 9-PEL Character Mode Clock 0 | 0 | 1 0 | Clock Sourc...

Set Clock
How can I reset the system clock automatically twice a year for the Daylight\Standart times? When congress started talking about changing the start and stop dates for daylight saving time, I just shook my head. When it became official, I was annoyed. I have a fair number if devices that *automatically* adjust for daylight saving time that are hard wired, not like my computer where I can at least turn the feature off. But when MS announced that they were only going to make a *patch* for WXP I was furious. That shows a complete disregard by MS for the general public. I know many f...

Clock settings
I want to keep my bios clock set to GMT and the OS time to local if that's possible. I want to be able to tell KDE that - My BIOS clock is set to GMT and I do not EVER want it touched! - My OS time is to be GMT -5 ("I" will reset for daylight time). ...

What is a good, cheap, Linux-supported hardware clock for a NTP-server? Any recommendations?
Hi everyone! My (public) NTP server current 'leeches' its time from other servers higher up the tree. I'd like to get my own hardware unit now. The 2 (affordable) options are DCF77 & GPS, right? Who can recommend something? It doesn't really matter to me whether it's a serial or USB unit... I'm based in Norway. Regards, Evert > My (public) NTP server current 'leeches' its time from other servers > higher up the tree. I'd like to get my own hardware unit now. > The 2 (affordable) options are DCF77 & GPS, right? Who can recommend > ...

clock
When configuring a virtex fpga with a prom in master serial mode, how is the clock generated by the fpga. I presume I don&#8217;t need to input any other clock other than my normal fast clock of 100MHz. In master mode the configuration clock is generated by an FPGE-internal RC oscillator. The frequency is not very accurate or stable, but good enough for the purpose. Peter Alfke =============== chuk wrote: > > When configuring a virtex fpga with a prom in master serial mode, how > is the clock generated by the fpga. I presume I don&#8217;t need to > input any other cloc...

Clock
hii all; i have created a method to display the time in a label. what i needs is that according to the second change the label time should also change according to that as a clock. for that i used the method time now in an infinitive loop and refreshed the label after each second. i have created this as a new process. but the problem with me is, its not refreshing after each second, sometimes after 5 seconds,sometimes after 3 seconds and it varies on. Is there any other method to make a clock as like we see in windows or linux. i am using visualworks 7.3.1. TIA Sreenath G K w...

Clock
I am trying to get my hands (no pun intended) on the clock function and the ability to put/get times. I would like to set an alarm on a PDA (that is a small computer) and need to get the current time, add 30 minutes and put the text into the text input area. How can I do that? Thanks F ep <eps57@hotmail.com> wrote: > I am trying to get my hands (no pun intended) on the clock function and the > ability to put/get times. > > I would like to set an alarm on a PDA (that is a small computer) and need to > get the current time, add 30 minutes and put the text into the text input > area. How can I do that? # what time is it 30 minutes from now? set time [clock format [clock scan "30 minutes"] -format "%T"] -- Glenn Jackman NCF Sysadmin glennj@ncf.ca ...

Arbitrary Clock Frequencies From Base Clock
Hello, I have a board with the Xilinx V2 Pro (xc2vp30). I am designing a BPSK demodulator on this board. For the demodulator, I need to generate arbitrary clock frequencies from 8 MHz to 10 MHz in 100 kHz increments from the base clock. How can I do this? Does anyone have any VHDL code I can use for this? Thanks and regards, Abhishek Hi, I do this using this simple Numeric Controlled Oscillator -NCO- code I found in here: http://www.analogservices.com/vhdlmod.htm However the generated clk is not pure in the sense that some periods are a bit longer than others. Robert abhisheknag@gmail....

Synchronization between CPU-clock and FPGA clock.
Hi, I want to know how to properly interface between the CPU clock and the FPGA clock. My board has separate clocks for CPU and FPGA. Best Regards, Kelvin Heya Kelvin, > I want to know how to properly interface between the CPU clock and the FPGA > clock. That's a pretty broad question. There are all sorts of solutions that vary in complexity. It will help if you can explain your design situation in more detail. What sort of data is flowing between the two clock domains? What's the interaction like? Regards, Vinh The CPU will write bytes into a register, at 8M-bytes/...

hardware clock problems?
Hi all, my system comes up at boot with the time (and date) it has been shutdown before. As soon xntp gets the right time from public timeservers, everything is ok. I assume the hardware clock of my system isn't working anymore (it did in the past, for sure). Is it the board battery? Could it be another problem, such as hardware clock isn't synchronized anymore at shutdown? If the battery is the problem, is every board using the same type or are there differences? And one stupid one... Why isn't the board using the power supply for the HW-clock, if power is available (which is t...

Reg:Clock to pad Delay of the System Clock.
Hi experts, Hi all i need a help,I am using the spartan FPGA.I am using the DCM to scale the input clock frequency to 72Mhz.This clock signal is feed to the sram in the board,which is also the system cock.When i analyse the timing report the clock to pad delay for the port sram_clk[clk output from DCM to SRAM] is not mentioned in the report. Could any one help me in finding the clock to pad delay in the timing report. ...

clock()
Ok, so I am trying to establish how boost.timer works and I try a few things and afaict it doesn't. So I open the header to see why and run some tests to establish what is going on and it all boils down to the clock() function. Here is the code: #include <iostream> #include <cstdlib> int main(void) { boost::timer tmr; sleep(15); std::cout << std::clock() << std::endl; return 0; } That program always outputs "0". Documentation on clock() says that it should return clock ticks since program started, which with the 15 second sleep that sho...

sys-rpl and clock
Hello, I made a program in sys-rpl (on hp49g+). It does something like :: CLEARLCD ... Then we have some sys-rpl code here, using XYGROBDISP or DISPROW3 and so on... Then we have WaitForKey ; The problem is that the clock is on the screen during the WaitForKey. Is-it possible to switch-off the clock during my program and switch on after? Of course, saving the flag (40) at the beginning of the program, changint it, and then restoring it will work. Is there anything simple? (Sorry of the English grammar...) Just try " :: CLEARLCD "Hello World" DISPROW1 WaitForKey (*) ...

Reading hardware clock
Is is possible to read the hardware clock rather than the software copy of it? I remember in the dim and distant past that OS_Word 14,1 would read the hardware version but since RO3 it only reads the software copy. IS there a way to ignore the software copy and read the hardware one? I suspect it might require IIC_Control but I don't understand how to use that :-( Andrew -- +----------------------------------------+---------------------------------+ | Andrew Conroy, Owl-Art Un-Ltd. | email: a.m.conroy@argonet.co.uk | | Coming to you on an Acorn RiscPC SA110 | Snail: 58 Newland Road, | | | Worthing, | | 'OwlArt' on IRC (ZFC A) | West Sussex. U.K. | +----------------------------------------+---------------------------------+ The impossible I can do at once, miracles take a little longer!! In message <4cc029ca94a.m.conroy@argonet.co.uk> Andrew Conroy <a.m.conroy@argonet.co.uk> wrote: > Is is possible to read the hardware clock rather than the software copy > of it? I remember in the dim and distant past that OS_Word 14,1 would > read the hardware version but since RO3 it only reads the software copy. > IS there a way to ignore the software copy and read the hardware one? I > suspect it might require IIC_Control but I don't understand how to use > that :-( Using IIC_Control is easy enough. The parameters ar...

Over Clocking
How do you over clock a video card? I have never tried it yet. Thanks...Steve -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- ...

set system clock
Hi, for synchronization purposes I need to set the system clock, anyone can tell me how to do this in Java? I need it both for a pda which is running windows mobile 2003 and a computer which is running ubuntu. Thanks. greetz, gerrit ...

Clocks
Hello I hope someone may be able to help. I'm running an iMac with Jaguar (10.2.8) and would like to have the date up there in the corner with the day and time - is there any way to do this? And is there a freeware program out there that would allow me to place a simple clock (digital or analog) showing a second time, on the desktop - I often use Messenger with friends in the UK (I live in Japan) Thanks in advance Stewy <anyone4tennis@hotmail.com> wrote: > I'm running an iMac with Jaguar (10.2.8) and would like to have the date > up there in the corner with the da...

Web resources about - kenel sets sys clock from hardware clock?? - comp.os.linux.misc

Simmons Hardware Company Warehouse - Wikipedia, the free encyclopedia
42°29′35″N 96°24′34″W  /  42.49306°N 96.40944°W  / 42.49306; -96.40944 Coordinates : 42°29′35″N 96°24′34″W  /  42.49306°N 96.40944°W  / ...

Battling Bunnings: Expert's plan to combine Masters and Home Timber & Hardware gains steam
Combining Masters Home Improvement with the Home Timber & Hardware is the only way to create a serious number two player in the hardware space, ...

Bunnings could be set to face a new force in hardware
... Dick Smith into a $520 million sharemarket sensation is hatching a plan to bring together Australia's two biggest, independent hardware chains ...

Battling Bunnings: Expert's plan to combine Masters and Home Timber & Hardware gains steam
Combining Masters Home Improvement with the Home Timber &amp; Hardware is the only way to create a serious number two player in the hardware ...

Building a (sub-$1000) Hackintosh that meets the Oculus Rift hardware requirements – Part I
Back at the beginning of March, Oculus CEO Palmer Luckey made controversial statements about Apple’s hardware, specifically the inability of ...

Ace Hardware Debuts First Work from O'Keefe Reinhard & Paul
The new campaign features its friendly, stick-in-your-head jingle "Ace is the place with the helpful hardware folks," and includes real Ace store ...

DARPA to host killer “Improv” performances with hacked hardware
... Defense Science Office is preparing for an alternative sort of "improv" performance. DARPA is inviting researchers, developers, and hardware-hacking ...

Google joins Facebook's game-changing project that's eating the $140 billion hardware market
If the hardware industry was nervous about Facebook's game-changing Open Compute Project before, it should now be downright terrified now: Google ...

How to use Apple Diagnostics to identify Mac hardware problems
... are usually pretty reliable, but when they do go wrong the Apple Diagnostics tool should help you figure out if you have a software or a hardware ...

Xbox One could be getting hardware upgrades
... Showcase and the head of Xbox, Phil Spencer, dropped some hints about the Xbox One's future. "You'll actually see us come out with new hardware ...

Resources last updated: 3/25/2016 12:26:07 PM