Ideally you would use SNMP for this kind of thing. A combination of SNMP and the excellent MRTG graphing system can create some nice traffic graphs for you but its not a quick or simple thing to set up.
'ifconfig' will give you a received (RX) byte count and transmitted (TX) byte count for each network interface since the machine was booted. If you run it every 5 minutes (or whatever) you can work out how much traffic has gone through in that time, or have a Perl script run from the CRON to grab that info and log it.
Chart data provided with kind permission from
ELSPA