Vnstat how-to
-
@cmb:
vnstat is available for manual 'pkg install' now. That's a first step towards getting the full package back.
Just SSH in, and run:
pkg update pkg install vnstat
To install it.
Followed instructions, rebooted PFsense, see no package installed and no VNstat under status, any more instructions available/needed?
-
That just installs the FreeBSD package. It won't show up in the GUI, it's all CLI: http://humdi.net/vnstat/man/vnstat.html
-
Profound sadness, thanks for the update though!
-
I am working on a front-end for it. You can scroll through my post history if you want more info/screencasts.
-
My vnstatd is working perfectly on my 2.3.1 box. I have also added a rc.d script for startup/shutdown to try to prevent corrupt data files.
Location: /usr/local/etc/rc.d/vnstatd.sh
#!/bin/sh . /etc/rc.subr name="vnstatd" rcvar=vnstatd_enable load_rc_config $name : ${vnstatd_conf="/usr/local/etc/vnstat.conf"} : ${vnstatd_flags="-d --config ${vnstatd_conf}"} required_files=${vnstatd_conf} command="/usr/local/sbin/vnstatd" run_rc_command "$1"
Added this to my /etc/rc.conf.local
vnstatd_enable="YES"
Now vnstatd starts at boot time and stops at shutdown.
I also added a backup script (that definately need tuning in order to only keep maybe a few days of backup in case something goes unnoticed). It was added to the crontab to run every hour
0 * * * * /root/vnstat_backup.sh >/dev/null 2>&1
Here is the /root/vnstat_backup.sh. I'm not sure if I had to install bash, but I think I did :
#!/usr/local/bin/bash #START TIME=`date +%Y-%m-%d_%H%M` # This Command will add date in Backup File Name. FILENAME=$TIME.tar.gz # Here i define Backup file name format. SRCDIR=/var/db/vnstat # Location of Important Data Directory (Source of backup). DESDIR=/root/vnstat_backup # Destination of backup file. #echo $TIME tar -cpzf $DESDIR/$FILENAME $SRCDIR #END
This script creates a ton of files that need to be cleaned manually once in a while, so if someone could tune it to delete files older than X days it would be great! :)
-
Just curious if there's any update, Comcast is rolling out more data caps and Fios is still working on outfitting our building.
-
I just got an email from comcast about caps - its 1TB.. are you actually using more than 1TB a month?
-
The Traffic Monitor package is in testing for pfSense 2.3.2 development builds now… just became available a day or two ago. A few minor bugs to be worked out and things that need to be tweaked so far, but it's there and it's working...
-
This traffic monitor package is based on what? Vnstat, Bandwidthd, something all new? Curious - maybe I will jump to the 2.3.2 just to check it out..
-
This traffic monitor package is based on what? Vnstat, Bandwidthd, something all new? Curious - maybe I will jump to the 2.3.2 just to check it out..
It's based on vnstat, just using the same graphing engine as the monitoring graphs to visualize the data, getting it from vnstat's JSON output.
-
Just wondering if this is planned to be implemented into an upcoming version soon, the Comcast data caps just rolled out to a bunch of new states and like hell I trust their meter over my own: https://www.reddit.com/r/cordcutters/comments/5az24d/comcast_rolls_out_new_data_caps_in_28_states/
-
The Traffic Totals package is available in 2.3.x. Go to System > Package Manager > Status_Traffic_Totals. Install that package and you'll have a new item added to your Status menu for Traffic Totals. You'll need to enable it under the Advanced settings and after 5 minutes, it'll start showing data.