You are not logged in.

#26 2020-12-26 11:26:44

Yann
Member
Registered: 2017-11-23
Posts: 235

Re: Trigger action when wireless network event

Sorry for the delay. I am not sure to understand all your answer.
I don't want to focus 100% of the management on the wpa_cli, I would like an hybrid solution. As I said, I get several times every day disconnected from the wifi connection and my process needs time to tell me. I get informed after a few seconds. So, I would like both option, my process with a loop every X seconds, and an event process that tells me right away in the bar and maybe a notification that I got dis·connected. Also, I would like to do that to other kind of events, maybe bandwidth, disk, etc.

You think that I should put my loop process to run all the time without any sleep to decrease the time to get notified? I am a little concerned about CPU consumption. It looks to me a better solution to keep a light loop process and put everywhere I can event management to get informed right away. No ?


all different - all equal

Offline

#27 2020-12-26 13:23:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,459
Website

Re: Trigger action when wireless network event

But can the bar be triggered to update by these "events"?  It doesn't matter if the "event" is detected as soon as it happens but the bar only updates to display it every 5 seconds, you'll still not get the information any faster than if you polled every 5 seconds for the same information.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#28 2020-12-26 13:55:40

Yann
Member
Registered: 2017-11-23
Posts: 235

Re: Trigger action when wireless network event

Of course the bar will be updated right away. The event will run a script updating the bar without caring of the loop process. Both can do it.


all different - all equal

Offline

Board footer

Powered by FluxBB