Shashank D ***@***.***> writes:

>> Hmm, good question. So you're just running ss in a busy loop, or did you keep the 'sleep'? If so, that seems a bit excessive to do by default.
> Yes I did keep the sleep in the loop. Here's the full loop:
> ```bash
> command_string=$(cat <<EOF
> duration="$(echo "$count*$interval" | bc) sec";
> endtime=\$(date -d "\$duration" +%s%N);
> while (( \$(date +%s%N) <= \$endtime )); do
> ss -t -i -p -n state connected "dst $target $filter"
> echo ''
> date '+Time: %s.%N';
> echo "---";
> sleep $interval || exit 1;
> done
> EOF
> )
> ```

Right, makes sense. Feel free to open a PR with this, but please lose
the dependency on 'bc'. Either do the math in native shell, or just pass
the duration as a parameter from Flent.

Did you test whether this works on OpenWrt and on Dash?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.