Six helpers were written as `ss ... | awk ... || netstat ... | awk ...`.
A pipeline exits with its last command's status, so a missing ss still
ended in awk exiting 0 and the netstat branch never ran. On systems
without ss, sortcons, sortconip, req20, timewait20, syn20 and port_pro
printed nothing.
Each helper now picks ss or netstat by whether ss is installed. con80
gets the same shape so the file has one idiom and no longer prints
"command not found: ss" on the way to netstat. Where both backends
share the same columns, the awk program is written once.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The three helpers hard-coded port 80. Most web traffic is HTTPS now, so
counting port 80 alone misses most of it. With no argument they now
match 80 and 443 together; passing one or more ports narrows them to
those (`con80 8080 8443`).
http20 also moves -c before the filter expression, since BSD getopt
stops at the first non-option argument.
BREAKING CHANGE: con80, req20 and http20 now include port 443 by
default. Pass the port explicitly (`con80 80`) to get the old behavior.
Closes#14114
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>