I wrote this tool a number of years ago, the focus on collecting virtually anything you might want to look at, one of which is network data. The neat thing is you can run collectl as a service and play back the data later either as text such as:
# <----------Network---------->
#Time KBIn PktIn KBOut PktOut
04:23:50 15 47 3 30
04:23:51 0 7 0 4
or if you're interested in individual network interfaces you can do that too as:
# NETWORK STATISTICS (/sec)
# Num Name KBIn PktIn SizeIn MultI CmpI ErrIn KBOut PktOut SizeO CmpO ErrOut
04:24:23 0 lo: 0 6 92 0 0 0 0 6 92 0 0
04:24:23 1 eth0: 0 3 64 0 0 0 0 0 0 0 0
04:24:23 2 eth1: 0 2 67 0 0 0 0 1 150 0 0
04:24:23 3 sit0: 0 0 0 0 0 0 0 0 0 0 0
04:24:24 0 lo: 0 0 0 0 0 0 0 0 0 0 0
04:24:24 1 eth0: 0 4 134 0 0 0 0 0 0 0 0
04:24:24 2 eth1: 0 6 70 0 0 0 1 6 203 0 0
04:24:24 3 sit0: 0 0 0 0 0 0 0 0 0 0 0
Alternatively you can also generate the output in space-separated format like this (there is also a for that shows individual interfaces):
#Date Time [NET]RxPktTot [NET]TxPktTot [NET]RxKBTot [NET]TxKBTot [NET]RxCmpTot [NET]RxMltTot [NET]TxCmpTot [NET]RxErrsTot [NET]TxErrsTot
20090104 04:25:21 10 4 1 0 0 0 0 0 0
20090104 04:25:22 3 5 0 1 0 0 0 0 0
which means you can directly load it other tools such as excel or open office to examine/plot it OR use tools like gnuplot directly.
These examples show it taking samples every second - the default when run as a daemon is once every 10 seconds. You can set that interval to anything you want including fractional times.
Far too many options to go into them here, but check out
http://collectl.sourceforge.net/ to learn more
-mark