üzenetek

hozzászólások


warn!ng
(tag)

ha érdekel vkit egy shellből futtatható forgalommérő pre-alpha script, csak tessék, csak tessék :)

[M](C)
root@OpenWrt:/mnt/hdd# cat ns.sh
while [ 1 ] ;
do sleep 0 ;
regiTX=$(ifconfig eth0.2 | grep "TX bytes" | cut -d: -f3 | cut -f1 -d' ') ;
regiRX=$(ifconfig eth0.2 | grep "RX bytes" | cut -d: -f2 | cut -f1 -d' ') ;
sleep 60 ;
ujTX=$(ifconfig eth0.2 | grep "TX bytes" | cut -d: -f3 | cut -f1 -d' ') ;
ujRX=$(ifconfig eth0.2 | grep "RX bytes" | cut -d: -f2 | cut -f1 -d' ') ;
diffTX=$(((($ujTX-$regiTX)/1024)/60)) ;
diffRX=$(((($ujRX-$regiRX)/1024)/60)) ;
textTX=" TX kB/s" ;
textRX=" RX kB/s" ;
ido=$(date +%F%t%T%t) ;
echo -e $ido \\t $diffTX \\t $textTX \\t $diffRX \\t $textRX ;
done
root@OpenWrt:/mnt/hdd#
(/C)[/M]

[ Szerkesztve ]

üzenetek