This program will output a PNG and a text file that can be used in scripts or be included in web pages to show current bandwidth usage. The amount of total bandwidth can be customized. The PNG output appears as a bar graph showing maximum possible usage with the current inbound or outbound usage shown as a differently colored bar. The text file displays the current bandwidth utilization.
To start going with bwbar: bwbar eth0 1000 -d /home/pavs
You can also customize display output of the PNG file in pixels like here: