# CONFIGURATION - adapt these variables to yor needs
# These will be docmented once this is finished - promise ;)
-# HINT: You may want to use lagdetect_suggest_config from this distribution to
-# get (hopefully) sensible configration values for FUDGE_MS and PING_PEERS.
+# HINT: You may want to use sqm_lagthrottle_suggest_config.sh from this
+# distribution to get (hopefully) sensible configration values for FUDGE_MS and
+# PING_PEERS.
FUDGE_MS=20.0 # "fudge" factor in msec that yor PING_PEERS are expected to fluctuate in latency under normal conditions
PING_PEERS='1.1.1.1 8.8.8.8' # space-separated list of peer addresses to ping
done
-if ! test -r ./__lagdetect.awk
+if ! test -r ./__sqm_lagthrottle.awk
then
- printf 'FATAL: "__lagdetect.awk" not found; are you in the correct directory?"\n'
+ printf 'FATAL: "__sqm_lagthrottle.awk" not found; are you in the correct directory?"\n'
exit 1
fi
-v PINGSLOTS="${PING_SLOTS_PER_PEER}" \
-v FUDGE="${FUDGE_MS}" \
-v PING_PEERS="${PING_PEERS}" \
- -f ./__lagdetect.awk
+ -f ./__sqm_lagthrottle.awk
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-for p in sort sleep cat awk fping
+for p in sort sleep cat awk tee fping
do
type "${p}" >/dev/null || { printf 'FATAL: Required program "%s" not installed.\n' "${p}" >&2; exit 1; }
done
set -u
echo "This script will ping potential peers for two minutes," >&2
-echo "record stats, and recommend configuration values for lagdetect.sh" >&2
+echo "record stats, and recommend configuration values for sqm_lagthrottle.sh" >&2
echo "" >&2
echo "Please keep your Internet-directed traffic at a minimum while pinging." >&2
echo "" >&2