#!/bin/bash # if [ $# -ne 2 ]; then cat -< $test2a" && MAX1=$test2a test2b=$( buffcalc 262144 ) test2c=$( buffcalc 4194304 ) simplemath "$MAX2 > $test2c" && MAX2=$test2c test2d=$( echo "scale=5; $BANDWIDTH * 1000 * 1000 / 8 * $RTT" |bc) test2e=$( buffcalc 65535 ) test3a=$( mtucalc 1500 52 ) simplemath "$MAX1 > $test3a" && MAX1=$test3a test3b=$( mtucalc 9000 52 ) simplemath "$MAX2 > $test3b" && MAX2=$test3b test3c=$( echo "scale=5; ( $BANDWIDTH / 0.7 / 8 * $RTT * sqrt($LOSS) * 1000 * 1000 ) + 52" |bc -l) test4a=$( mtucalc 1500 40 ) simplemath "$MAX3 > $test4a" && MAX3=$test4a test4b=$( mtucalc 9000 40 ) simplemath "$MAX3 > $test4b" && MAX3=$test4b test4c=$( echo "scale=5; ( $BANDWIDTH / 0.7 / 8 * $RTT * sqrt($LOSS) * 1000 * 1000 ) + 40" |bc -l) simplemath "$MAX3 > $test4c" && MAX3=$test4c test4d=$( buffcalc 65535 ) simplemath "$MAX3 > $test4d" && MAX3=$test4d MAX1B=$( bits2bytes $MAX1 ); MAX2B=$( bits2bytes $MAX2 ); MAX3B=$( bits2bytes $MAX3 ) cat -<