[BlueOnyx:16724] Feature option (vnstat)

George F. Nemeyer tigerwolf at tigerden.com
Fri Dec 19 20:15:21 -05 2014


"vnstat" is a trio of small programs that monitors and graphs out network
usage for user-selected interface.

Info is here:  http://humdi.net/vnstat/

It's open source, and trivial to compile/install.

The 3 programs are:

1.  "vnstatd" A data gathering routine that simply looks at the
    ifconfig-like status to get the bytes in/out numbers and stuffs them
    into a database.  It can be run manually, or as a background daemon.
    As a daemon, the sample interval is adjustable.  The resulting
    database can be exported to any other application.

2.  "vnstat" A command line program that reads the database and creates
    asci-graphs of the data.  Time interval and grouping can be daily,
    monthly, and yearly as well as some other options for display.

3.  "vnstati" A command line program that can be run manally as desired,
    or as cron job.  It reads the database and creates .png graphics
    images of the raw data similarly to "vnstat" but using graphical bars
    and pie charts more suited for putting onto a web page.  (Here, I just
    have it store the output files into a web directory where a simple
    "vnstats.html" embeds the .png images into a locally themed page.

There is a 'vnstat.conf' file that sets up defaults for all the above.
Things like 'monthy' stats can be adjusted to a billing cycle date.

Since the data is just raw ethernet/wireless/whatever port transfer
numbers, it can do 'eth0' but not something like 'eth0:1', so you get
interface totals, not 'virtual interface' breakouts.

I've found it very handy for a quick look at what a given server is doing,
and it gives a fast way to see if there are abnormal 'spikes' due to
spammers or attacks.

A separate but nice .php-based frontend is availble to build a web page
with 'user selection' links to see the different outputs.
That's described here:  http://www.sqweek.com/sqweek/?p=1

I think at least the basic 'vnstat' package integrated into the BX GUI
would be very useful for the BX admin monitoring or performance pages.




More information about the Blueonyx mailing list