Watchcat - ping without timeout?

Maybe something for @vgaetera ?

Just came across the watchcat. I guess she likes my watchdog. So I let her run next to him. But: The cat is doing

ping $ping_family -s "$ping_size" -c 1 "$host" &> /dev/null

whereas I would recommend to add the W parameter

ping -c 1 -W 1 8.8.8.8

-W SEC Seconds to wait for the first response (default 10)

Otherwise the watchcat could get into trouble caused by serious hickups.

My 5G modem has some connectivity issues from time to time and the pings do never fail, they just "hang". This is why I added the W parameter.

Just use ModemManager as that now includes automatic reconnection by default thanks to various recent updates that I’ve been involved in promoting and testing.

Also you might consider cake-autorate for variable rate SQM and that can also be used to diagnose connection issues.

ModemManager is capable of recognizing a "hung" 5G connection?
Like a timeout on ping?
Also cake-autorate - does this diagnose a hung 5G connection?

I didn't know that...

I'm using it with -c 2 for reliability.

ModemManager certainly detects disconnection events - in my case a regular 48 hour disconnection, which now informs netifd that the connection is down, and by default now triggers a reconnect. See:

Also consider the force_connection option in:

cake-autorate offers extensive connection monitoring because it works by monitoring data transfer rates across the interfaces and probing a set of reflectors in a very granular way in order to adjust cake bandwidth on the fly. Loss of connectivity is rapidly detected, classified as a stall and logged. It'd be trivial to intercept those and run a custom command, but I think this shouldn't be necessary providing ModemManager is operating correctly.

In any case, using cake (with cake-autorate if using a variable bandwidth conneciton like 4G or 5G) is desirable to address bufferbloat.

https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm

https://www.waveform.com/tools/bufferbloat

Yes, a disconnection.
This thread is about a hung connection.
This thread is about a timeout for ping. Doesn't matter if it is -c 1 or -c 2.
It is a matter about -W 1

Just like watchcat. In watchcat you can easily check the code.

Regarding 4G or 5G connections: These are two different worlds.
With 5G you have a continous low latency connection. You always have a low RTT, always a fast ping. That's 5G.

For cake-autorotate, you write "Loss of connectivity is rapidly detected, classified as a stall and logged".
The question is: Who is taking care of the repair of the connection if something happens.

Just trying to be helpful.

:smiley:

Agree. Just added -W to my script. Thanks for the idea.

1 Like

Totally appreciated!
The question was in regard to "ping hung" and what countermeasures can be taken to keep the connection up.
It seems like both is not helpful in that case: Modemmanager / Cake.
Whereas Modemmanager is great powerful, also used on fedora.

But for a ping hung, Watchcat can now be used, which is even much better than any of my scripts - thanks @AndrewZ

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.