For all those people that wonder how to reset their statistics on a daily / weekly / monthly base, the README actually provides some good clues. Here is a re-write:
These logs are
- log.1.0.cdf - log.1.5.cdf for daily
- log.2.0.cdf - log.2.5.cdf for weekly
- log.3.0.cdf - log.3.5.cdf for montlhy
- log.4.0.cdf - log.4.5.cdf for yearly
The log format is best documented in the "StoreIPDataInCDF" function in bandwidthd.c. As of this writing, it consists of one line for each IP address for each interval.
The line contains only data for the previous interval.
IP Address,Timestamp,Total Sent,Icmp Sent,Udp Sent,Tcp Sent,Ftp Sent,Http Sent, P2P Sent,Total Received,Icmp Received,Udp Received,Tcp Received,Ftp Received,Http Received, P2P Received
It will rotate out 5 times before deleting the oldest log file.
You will also want to make a crontab entry like so:
0 0 * * * root /bin/kill -HUP `cat /var/run/bandwidthd.pid`
This will send Bandwidthd a HUP every night at midnight. When Bandwidthd receives a HUP it schedules a rotation of it's log files during the next graphing run. Daily log files rotate each HUP.
Weekly/Monthly/Yearly log files rotate every so many HUPs.
You can import the raw CDF files into Open Office calc and use the following function to convert the timestamp to a normal date/time: