Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #270632

Re: How to use /etc/adjtime

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: How to use /etc/adjtime
Date 2024-06-30 06:50 +0200
Message-ID <IUUFH-6BNb-3@gated-at.bofh.it> (permalink)
References (4 earlier) <IUl5f-6e8I-1@gated-at.bofh.it> <IUloB-6euN-5@gated-at.bofh.it> <IUmul-6f7l-3@gated-at.bofh.it> <IUp8S-6gVm-7@gated-at.bofh.it> <IUq4V-6hvh-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 28 Jun 2024 at 15:05:34 (-0500), John Hasler wrote:
> David writes:
> > With chrony, you can monitor the RTC over time and adjust the system
> > clock in accordance with its drift rate at boot time, without
> > correcting the RTC itself, or you can actually set the RTC from the
> > system clock periodically.
> 
> That leads to the probelem that started this thread: system time being
> set incorrectly at boot and then stepped later.
> 
> 
> > The particular problem at shutdown is that there were/are systems, as
> > you described, that write the system time to the RTC without
> > necessarily regarding how you might be running the clock otherwise.
> > That alteration is unknowable for chrony when it restarts after
> > booting.
> 
> Obviously you must make sure that only one process ever writes to the
> RTC.
> 
> Actually you need never write to the RTC at all: just track its offset
> and drift rate.  That would require hacking the boot process to make
> sure only your code ever reads it, though.

I think that's what I wrote in the first half of the sentence at the top.
I don't think you can avoid the kernel setting the system clock before
chrony does, but I don't see the problem with that: chrony just sets it
again when it runs.

So the problem may reduce to how to get resume to run chrony (as the
example) before any user processes run again. There are options to
make that more likely, like keeping chrony resident, and increasing
its scheduling priority, and I have already suggested a method that
might allow systemd to make it certain.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-27 18:50 +0200
  Re: How to use /etc/adjtime <tomas@tuxteam.de> - 2024-06-27 19:10 +0200
    Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 15:50 +0200
  Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-28 04:30 +0200
    Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 15:50 +0200
      Re: How to use /etc/adjtime Greg Wooledge <greg@wooledge.org> - 2024-06-28 16:10 +0200
        Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-28 16:40 +0200
        Re: How to use /etc/adjtime John Hasler <john@sugarbit.com> - 2024-06-28 16:50 +0200
          Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-28 17:10 +0200
            Re: How to use /etc/adjtime John Hasler <john@sugarbit.com> - 2024-06-28 18:20 +0200
              Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-28 21:10 +0200
                Re: How to use /etc/adjtime John Hasler <john@sugarbit.com> - 2024-06-28 22:10 +0200
                Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-30 06:50 +0200
                Re: How to use /etc/adjtime <tomas@tuxteam.de> - 2024-06-29 07:00 +0200
                Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-30 06:50 +0200
          Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 20:50 +0200
            Re: How to use /etc/adjtime Max Nikulin <manikulin@gmail.com> - 2024-06-29 03:30 +0200
        Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 20:40 +0200
          Re: How to use /etc/adjtime Greg Wooledge <greg@wooledge.org> - 2024-06-28 21:00 +0200
            Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-28 21:50 +0200
            Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 22:00 +0200
              Re: How to use /etc/adjtime Greg Wooledge <greg@wooledge.org> - 2024-06-28 22:30 +0200
                Re: How to use /etc/adjtime Stefan Monnier <monnier@iro.umontreal.ca> - 2024-06-28 23:10 +0200
                Re: How to use /etc/adjtime David Wright <deblis@lionunicorn.co.uk> - 2024-06-29 02:10 +0200
  Re: How to use /etc/adjtime Charles Curley <charlescurley@charlescurley.com> - 2024-06-29 06:00 +0200
    Re: How to use /etc/adjtime Charles Curley <charlescurley@charlescurley.com> - 2024-06-29 18:50 +0200

csiph-web