With the recent threats from ISP’s lately to implement bandwidth caps on their customers, I began questioning how much bandwidth my family uses in a typical month.
I spent a few hours on google trying to find a program which could do just that, and give me both raw statistics as well as summations at the hourly, weekly, and most importantly monthly increments.
Having not found a suitable program, I began writing my own. While struggling with the 32-bit limit set on the netdev stats counter, however, I came across Crunchbang Linux, and found a post on their blog about vnstat. VNStat is a program that gives you everything you want from a network bandwidth usage standpoint, including the aforementioned statistics.
Even better, when coupled with the vnstat php frontend, seen above, you can show all the users of your network what your utilization is.
Of course, to set this up for a network this machine has to either be setup as your network’s router, or can do some changes with your default gateway if that is not possible.