Re: [chrony-users] How to detect internet becoming available

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On 11.09.2021 20:39, Uwe Fechner wrote:
> Dear Andrei,
> 
> You wrote:
> "Why? chrony should recover when time sources become reachable."
> 
> Indeed, it seams to work ...
> 
> I used ntp before, and with ntp it did not work without restarting ntp ...
> 
> But what is the command
> chronyc online
> needed for if chronyd discovers the online status automatically?
> 

"offline" means chrony will not poll this source. This is different from
your case which is simply temporary network outage somewhere between
your system and time servers. Your sources are not "offline" so you do
not need to place them "online".

> I currently have it in the scripts /etc/network/if-up.d/01_start_chrony and
> /etc/NetworkManager/dispatcher.d/wwan0 .
> 

Because NM dispatcher script offlines sources when local system
configuration makes it impossible to reach them. Again, it is unrelated
to connectivity status outside your system. In this case chrony simply
continues to poll sources until they start answering again.

> My chrony.conf file:
> 
> pool pool.ntp.org iburst auto_offline
> driftfile /var/lib/chrony/drift
> makestep 1.0 3
> rtcfile /var/lib/chrony/rtc
> rtconutc
> rtcautotrim 30
> 
> You also asked:
> "Is your board shut down when it gets power failure indication or it is simply switched off?"
> 
> It is just switched off, no shut down in case of power failure.
> 
> Uwe
> 
> 
> ________________________________
> From: Andrei Borzenkov <arvidjaar@xxxxxxxxx>
> Sent: Saturday, September 11, 2021 12:10 PM
> To: chrony-users@xxxxxxxxxxxxxxxxxxxx <chrony-users@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [chrony-users] How to detect internet becoming available
> 
> This email originated from outside of your organization. Please do not click on links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> On 11.09.2021 13:02, Uwe Fechner wrote:
>> Hello,
>>
>> we have an Linux ARM board that can be connected to the internet
>> using a wired connection.
>>
>> Chrony is started at boot time.
>>
>> After a power failure it can happen that our board starts up BEFORE
>> internet becomes available, for example because the router it is
>> connected to has a higher startup-and-sync time than our board.
>>
>> How can I inform chrony that internet is available?
>>
> 
> Why? chrony should recover when time sources become reachable.
> 
>> I know I can use the command "chronyc online", but how can I trigger
>> that without using network manager?
>>
> 
> Do you mean your sources are offline after boot? Is your board shut down
> when it gets power failure indication or it is simply switched off?
> 
> --
> To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
> with "unsubscribe" in the subject.
> For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
> with "help" in the subject.
> Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
> 
> 


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/