pingcheck icon indicating copy to clipboard operation
pingcheck copied to clipboard

Offline scripts run multiple times

Open pannal opened this issue 1 year ago • 12 comments

Hey,

Maybe this is intended behavior, but it can happen that the offline scripts are run multiple times before the connection is back and the online scripts run.

I'm comparing the GLOBAL state against "OFFLINE" in my offline script and run a beep command.

Is this intended behavior? Shouldn't they only run once when the state doesn't change?

Thanks!

pannal avatar Jul 11 '24 22:07 pannal

The intended behavior would be to run the scripts for every interface that goes on/offline. Could that be why you are seeing multiple calls? That's why the GLOBAL state exists.

br101 avatar Jul 15 '24 09:07 br101

This is my offline script:

if [ "${GLOBAL}" == "OFFLINE" ]; then
    beep -l 50 -D 50 -n -l 50 -D 50 -n -l 50
fi

I think I'm doing what you're suggesting.

pannal avatar Jul 15 '24 09:07 pannal

Is this the wrong approach? I'm only monitoring the "wan" interface in pingcheck. There's also wan6 and eth1.

pannal avatar Jul 17 '24 22:07 pannal

Seems to be fine! So even though you have only one interface and you check for the global state you still get multiple beeps?

br101 avatar Jul 18 '24 08:07 br101

Exactly. What might happen: The modem gets restarted when I'm offline for too long (via home assistant); the IP of wan might change multiple times, so the device might come up and go down again. But it's never "online" during that state (the online script also doesn't get called), and the offline script gets called multiple times when that happens.

pannal avatar Jul 18 '24 10:07 pannal

OK. Honestly it's been a while since i worked on this project and i can't remember all the details. Could you start pingcheck in the foreground and send me the output there?

br101 avatar Jul 18 '24 10:07 br101

Sure:

pingcheck
Configured interface 'wan' interval 10 timeout 30 host 8.8.8.8 ICMP (80) ignore_ubus 0
UCI: interface 'sta' is disabled
Failed to add server object: Invalid argument

Init ICMP ping on 'wan' (eth1)
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
Resolved 8.8.8.8 to 8.8.8.8
Interface 'wan' changed to ONLINE
Scheduling 'online' scripts for 'wan'
Running 'online' scripts for 'wan'
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 7180
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 14574
ICMP echo received for different handle that was not found 9562
ICMP echo received for different handle that was not found 3471
ICMP echo received for different handle that was not found 14574
^C
wan:    ONLINE   100% (1/1 on eth1)

pannal avatar Jul 18 '24 15:07 pannal

And my config:

config default
        option host 8.8.8.8
        option interval 10
        option timeout 30
        option protocol icmp
        ## to check via TCP connect instead of ICMP:
        #option protocol tcp
        #option tcp_port 80
        #option panic 10
        #option ignore_ubus 1

config interface
        option name wan

config interface
        option name sta
        option disabled 1
cat /etc/pingcheck/offline.d/beep.sh
#!/bin/sh

# ${INTERFACE} -- logical network interface (e.g. wan) which goes online or offline
# ${DEVICE} -- physical device (e.g. eth0) which goes online or offline
# ${GLOBAL} -- global state ONLINE or OFFLINE depending on wether device is online thru other interfaces

#if [ "${INTERFACE}" != "wan" ]; then
#    exit 0
#fi

if [ "${GLOBAL}" == "OFFLINE" ]; then
    beep -l 50 -D 50 -n -l 50 -D 50 -n -l 50
fi
cat /etc/pingcheck/online.d/beep.sh
#!/bin/sh

# ${INTERFACE} -- logical network interface (e.g. wan) which goes online or offline
# ${DEVICE} -- physical device (e.g. eth0) which goes online or offline
# ${GLOBAL} -- global state ONLINE or OFFLINE depending on wether device is online thru other interfaces

#if [ "${INTERFACE}" != "wan" ]; then
#    exit 0
#fi

if [ "${GLOBAL}" == "ONLINE" ]; then
    beep -l 50 -D 50 -n -l 150
fi

pannal avatar Jul 18 '24 15:07 pannal

Looks like you haven't stopped the pingcheck running in the background. do /etc/init.d/pingcheck stop before

br101 avatar Jul 18 '24 16:07 br101

Sorry, stopped pingcheck before running the command:

pingcheck
Configured interface 'wan' interval 10 timeout 30 host 8.8.8.8 ICMP (80) ignore_ubus 0
UCI: interface 'sta' is disabled
Init ICMP ping on 'wan' (eth1)
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
Resolved 8.8.8.8 to 8.8.8.8
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
Interface 'wan' changed to ONLINE
Scheduling 'online' scripts for 'wan'
Running 'online' scripts for 'wan'
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 8506
ICMP echo received for different handle that was not found 7031
ICMP echo received for different handle that was not found 3494
^C
wan:    ONLINE   100% (1/1 on eth1)

pannal avatar Jul 21 '24 01:07 pannal

To circumvent this, I've changed my offline script to:

if [ -f "/tmp/offline" ]; then
    exit 0
fi

if [ "${GLOBAL}" == "OFFLINE" ]; then
    beep -l 50 -D 50 -n -l 50 -D 50 -n -l 50
    touch /tmp/offline
fi

and online script to:

if [ "${GLOBAL}" == "ONLINE" ]; then
    beep -l 50 -D 50 -n -l 150
fi

rm /tmp/offline

pannal avatar Jul 26 '24 13:07 pannal

Hmm no, even that circumvention doesn't work reliably. I guess the online script is called intermittently and possibly so quickly after the offline script, that the beep commands overlap.

Edit: Moving the touch command above the beep might fix this as beep blocks

pannal avatar Aug 02 '24 10:08 pannal