Hi list, today I'm writing you to ask you some hints, suggestions or best practice to introduce a bandwidth usage monitoring in shorewall.
What I'm trying to acheive is a csv file or something similar to collect bandwidth usage log, in/out of the internet interface.. (out direction should be enough, btw) My first approch was to use infos provided by sys/class/net Something like this: IFACE="eth5" cd /sys/class/net/$IFACE/statistics # header echo "date;time;bandwidth" old=$(<tx_bytes) while $(sleep 1); do now=$(<tx_bytes) echo $(date +%d-%m)";"$(date +%H:%M:%S)";"$((($now-$old)/1024))"KB/s" old=$now done Is there any better way to proceed? Thank you so much for all your suggestions. Nick -- +---------------------+ | Linux User #554252 | +---------------------+ _______________________________________________ Shorewall-users mailing list Shorewall-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-users