I have troubles with the wlan connection of my media box. I have tried all buffer settings i found, but nothing helps. To find the reason, i came up, that there is no way to check network troughput in libreelec. So i decided to make a script which will do this….
#!/bin/sh
IF=$1;IF=${IF:=wlan0};SD=3;let K=1024*$SD
STAT () { awk -v IF=$1: '$0~IF { print ($1,$2,$10) }' < /proc/net/dev; }
USED () { awk -v K=$K '{T[NR]=($2+$3)/K}END{print $0,int(T[2]-T[1])}'; }
GRAF () { awk '{S="**********";print $0,substr(S S S S S S,1,$4/10)}'; }
echo -e "IF\tRX/TX-Bytes\tUSED-kB/s"
OT="STAT $IF" && sleep $SD
while (true);do
ST="STAT $IF"
echo -e "$OT\n$ST" | USED | GRAF
OT=$ST && sleep $SD
done