Znalazlem takie cos.

http://alec.pl/linux/stats.html
Generalnei ja potrzebuje statystyki tylko z interfejsu WAN w moim przypadku hso0.
CZy ktos wie jak to przerobic w odpowiedni sposob? I generalnie nie w perlu, bo chcialbm to na openwrt postawic.

-----
Zrobilem takie cos:
Kod: Zaznacz cały
3G /tmp # iptables -t mangle -D FORWARD -i hso0 -j STAT >/dev/null 2>&1
3G /tmp # iptables -t mangle -D FORWARD -o hso0 -j STAT >/dev/null 2>&1
3G /tmp # iptables -t mangle -F STAT >/dev/null 2>&1
3G /tmp # iptables -t mangle -X STAT >/dev/null 2>&1
3G /tmp # iptables -t mangle -N STAT
3G /tmp # iptables -t mangle -I FORWARD -o hso0 -j STAT
3G /tmp # iptables -t mangle -I FORWARD -i hso0 -j STAT
3G /tmp # iptables -t mangle -A STAT -o hso0
3G /tmp # iptables -t mangle -A STAT -i hso0
3G /tmp # iptables -t mangle -L STAT -vxZ
Chain STAT (2 references)
pkts bytes target prot opt in out source destination
0 0 all -- any hso0 anywhere anywhere
0 0 all -- hso0 any anywhere anywhere
Zeroing chain `STAT'
3G /tmp # iptables -t mangle -L STAT -vxZ
Chain STAT (2 references)
pkts bytes target prot opt in out source destination
245 40987 all -- any hso0 anywhere anywhere
232 83871 all -- hso0 any anywhere anywhere
Zeroing chain `STAT'
