Bandwidth Stats

David Proffitt david.proffitt at
Tue May 27 15:54:17 BST 2003

Hello All

I'd like to generate some simple bandwidth usage stats (total bytes in/out per day)
 (on a machine running FreeBSD 4.8) 
- I tried running the following crontab entry:

59 23 * * * ( echo -n `date`' ' ; netstat -ib -I fxp0 -f link | grep fxp0 ) >>

and fed the result into a script to generate a graph at the end of the month

Trouble is the byte counters get reset every few days

Is it possible to reset the counters just after I run netstat? - would doing so
cause other problems?

Or is there a better way to do this?


David Proffitt, UNIX SysAdmin/Developer
Independent Television News Ltd
david.proffitt at

More information about the Ukfreebsd mailing list