In an attempt to make my life easier I want to log all bandwidth used on my server for a day, and then somehow export it. It doesn't matter much how it exports it because I can parse that stuff myself, but I need software to be able to accurately log traffic going in and out of eth0.
If anyone knows of such software, I'd be grateful if you could provide a link. I have already Googled for such things yet found nothing suitable.
Cheers.
Best Answer
My recommendation is vnStat:
It works as advertised and seems like a good match for your needs.
To facilitate parsing you'd probably like to take a look at the
--xml
and--dumpdb
switch in the vnstat documentation:--xml
: Show database content for selected interface or all interfaces in xml format. All traffic values in the output are in KiB.--dumpdb
: Instead of showing the database with a formatted output, this output will dump the whole database in a format that should be easy to parse with most script languages.Feature list: