Hi all. Got a question. I got a box on my network that I'd like to be able to track bandwidth usage on. Just to see how much traffic is passing through it in a one month period and daily over a 24 hour period. Is there some kind of application I can use to log total bytes sent and total bytes recieved? I don't need to know specifically WHAT was sent, but rather HOW MUCH of it was sent. [ ... ]
Try something like the following IPFW rules, replacing IIF with the name of the network interface you want to pay attention to:
add pipe 11 tcp from any to any in via IIF add pipe 11 udp from any to any in via IIF add pipe 11 ip from any to any in via IIF pipe 11 config queue 60 add pipe 12 tcp from any to any out via IIF add pipe 12 udp from any to any out via IIF add pipe 12 ip from any to any out via IIF pipe 12 config queue 60
The normal periodic processing ought to cause these stats to be reset daily. This really is the easiest way of accomplishing what you've asked for, but:
What is the easiest way to do this short of setting up IPFW and doing a kernel compile and all that nasty stuff. Any suggestions will be welcome.
...another approach would be to run 'netstat -s' on a daily basis, parse the output, and subtract values to obtain daily deltas. You'd have to write 10-20 lines of shell code using grep and awk, or use Python or Perl to do the task.
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"