1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-07-12 01:23:54 +08:00
parent 63fe792617
commit 39435ef52b
24 changed files with 5667 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#!/bin/ash
IF=$1
if [ -z "$IF" ]; then
IF=`ls -1 /sys/class/net/ | head -1`
fi
RXPREV=-1
TXPREV=-1
echo "Listening $IF..."
while [ 1 == 1 ] ; do
RX=`cat /sys/class/net/${IF}/statistics/rx_bytes`
TX=`cat /sys/class/net/${IF}/statistics/tx_bytes`
if [ $RXPREV -ne -1 ] ; then
let BWRX=$RX-$RXPREV
let BWTX=$TX-$TXPREV
echo "$BWRX $BWTX">/tmp/netspeed
fi
RXPREV=$RX
TXPREV=$TX
sleep 1
done

View file

@ -0,0 +1,11 @@
{
"luci-app-oled": {
"description": "Grant UCI access for luci-app-oled",
"read": {
"uci": [ "oled" ]
},
"write": {
"uci": [ "oled" ]
}
}
}