Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Traffic accounting with iptables

No change in size, 00:47, 16 December 2006
Generate a traffic.log: Bug fix
echo -n `date "+%Y-%m-%d %H:%M:%S"` >> $trafficlog
echo -n " $i " >> $trafficlog
echo `iptables -nv -L FORWARD | grep ' " $i ' " | tr -s [:blank:] |cut -d' ' -f3| awk '{sum+=$1} END {print sum;}'` >> $trafficlog
done
# reset the counter
22
edits