Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
You normally don't need to do this if you run a ntp daemon.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dogshu
Apprentice
Apprentice


Joined: 22 Jun 2003
Posts: 168
Location: New Haven, CT, USA

PostPosted: Fri Mar 16, 2012 10:33 pm    Post subject: You normally don't need to do this if you run a ntp daemon. Reply with quote

/etc/conf.d/hwclock says that you don't need to set clock_systohc="YES" if you are running an ntp daemon. I'm not sure that this comment is accurate. All of my systems run ntp daemons. When I set clock_systohc="no" my systems say that filesystems were mounted in the future on boot because the hardware clock is wrong. When my systems are unable to contact an ntp server at boot time, their clocks are off.

Perhaps ntpd used to set the hardware clock, but no longer does? This comment in /etc/conf.d/hwclock does not seem to be accurate.
Back to top
View user's profile Send private message
AngelKnight
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 118

PostPosted: Fri Mar 16, 2012 10:43 pm    Post subject: Reply with quote

Yeah I think "badly drifting clocks" wasn't considered as "normal" by whomever wrote the comment :)
Back to top
View user's profile Send private message
dogshu
Apprentice
Apprentice


Joined: 22 Jun 2003
Posts: 168
Location: New Haven, CT, USA

PostPosted: Sat Mar 17, 2012 5:41 pm    Post subject: Reply with quote

Is the hardware clock ever going to be set if clock_systohc="NO"? It doesn't matter if the drift is significant or not. If there is any drift at all the hardware clock will become wrong given enough time. It seems to me that running ntpd is completely unrelated to syncing the hardware clock.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 332
Location: Canada

PostPosted: Sat Mar 17, 2012 6:50 pm    Post subject: Reply with quote

Quote:
Is the hardware clock ever going to be set if clock_systohc="NO"?


My experience is that the hardware clock is not set under those circumstances. Also logic tells me the same thing.

Quote:
It seems to me that running ntpd is completely unrelated to syncing the hardware clock


This is my experience too, although with the caveat that I use netdate rather than ntpd.

To keep things in sync I do one of the following

(1) Set clock_systohc="YES" in /etc/conf.d/hwclock

or

(2) run netdate in my own local script which is

Code:
netdate utcnist.colorado.edu  ;hwclock --systohc


You are right; something has to set the hardware clock
I think that the coments in /etc/conf.d/hwclock are misleading, but if you ignore them everything does work as one would expect from the defns of
clock_systohc and clock_hctosys.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2518
Location: UK

PostPosted: Sat Mar 17, 2012 6:55 pm    Post subject: Reply with quote

I think the default is "don't touch the hardware" due to historically buggy RTC chips and not wanting to break those computers. I agree though, it's not a very useful default.
_________________
runit-init howto | Overlay
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1707

PostPosted: Sun Mar 18, 2012 11:25 am    Post subject: Reply with quote

Generally I don't want errors in the software (system) clock to be automatically passed
to the hardware clock at shutdown, since I don't run an NTP daemon. If it's left alone
a hardware clock has predictable drift, which can be allowed for in setting the system
clock on startup.

(From time to time I set the hardware clock by hand, immediately after setting the
system clock with ntpd -q).

Will
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum