11.12.2024 20:50, Stakanov via openSUSE Users wrote:
In data mercoledì 11 dicembre 2024 18:47:48 Ora standard dell’Europa centrale, Andrei Borzenkov ha scritto:
You will need to write one. and in what language one has to write such a script? (programming language, obviously).
Any language you are comfortable with including shell script. The challenge is not to chose language, but to formalize the conditions. "Pages load slowly" is not something that can be measured by computer. "Ping takes more than 3 seconds" is and can be easily used in script with ping -w 3 -c 1 "Loading of Google takes more than 5 seconds" is and can again be relatively straightforward used in scripts, e.g. $ curl -L --no-progress-meter -w '%{stderr}%{time_total}\n' https://google.com/ > /dev/null 1.000897 And then your script can call something like nmcli connection modify your-ethernet-connection ipv4.route-metric 1000 nmcli device reapply yout-ethernet-interface (unfortunately, kernel does not allow modification of the metric metric of the existing route, you need to delete and create new one).