Does `ntpd` set hardware clock?

20,373

Similar question was asked on Serverfault.com. This was the answer.

From the hwclock man page on RHEL 4.6:

This mode (we'll call it "11 minute mode") is off until something turns it on.  The ntp
daemon  xntpd  is  one thing  that  turns  it on.  You can turn it off by running
anything, including hwclock --hctosys, that sets the System Time the old fashioned way.

To see if it is on or off, use the command adjtimex --print and look at the value of
"status".  If the "64" bit of this number (expressed in binary) equal to 0, 11 minute mode 
is on.  Otherwise, it is off.

So by the virtue of you running hwclock --set you have likely turned it off. By the same token you can check the output of the adjtimex --print to confirm.

Share:
20,373

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    Does ntpd set hardware clock?

    Does ntpd set hardware clock if I pass -q option (mean one-time correction)?

    Linux 3.5.6, ntp 4.2.6.p5.

    Here is written that ntpd syncs the system clock to hardware every 11 minutes, but I can't find reference to this in the ntpd mans.

  • ekoeppen
    ekoeppen over 11 years
    Provide a meaningful explanation please.