Vnstat2 problems
-
I'm on the lastest beta, using a D200 notebook as test machine. It has only one Gigabit interface, so WAN1, WAN2 etc are tagged VLANs.
All Interfaces (the real one an the VLANs) show up as 1000baseT <full-duplex>in ifconfig though.When I start a bigger download with over 100MBit, vnstats Cron job starts to send those mails until the transfer is over:
X-Cron-Env: <shell= bin="" sh=""> X-Cron-Env: <path= etc:="" bin:="" sbin:="" usr="" sbin=""> X-Cron-Env: <home= var="" log=""> X-Cron-Env: <logname=root> X-Cron-Env: <user=root> Info: Traffic rate for "bge0" higher than set maximum 100 Mbit (60->825, r1587 t1588), syncing. Info: Traffic rate for "bge0_vlan666" higher than set maximum 100 Mbit (60->825, r1559 t55), syncing.</user=root></logname=root></home=></path=></shell=>
Also the graphs do not work anymore:
</full-duplex> -
With the latest snapshots it seems completely broken. I'm using a RAM disk for /tmp and /var on that system if it matters.
X-Cron-Env: <shell= bin="" sh=""> X-Cron-Env: <path= etc:="" bin:="" sbin:="" usr="" sbin=""> X-Cron-Env: <home= var="" log=""> X-Cron-Env: <logname=root> X-Cron-Env: <user=root> Error: Unable to open database directory "/var/lib/vnstat". Make sure it exists and is at least read enabled for current user. Exiting...</user=root></logname=root></home=></path=></shell=>
-
this is also present
Notice: Undefined index: totalrx in /usr/local/www/vnstat2/index.php on line 81 Notice: Undefined index: totalrxk in /usr/local/www/vnstat2/index.php on line 81 Notice: Undefined index: totaltx in /usr/local/www/vnstat2/index.php on line 82 Notice: Undefined index: totaltxk in /usr/local/www/vnstat2/index.php on line 82 Notice: Illegal string offset 'rx' in /usr/local/www/vnstat2/index.php on line 89 Notice: Illegal string offset 'tx' in /usr/local/www/vnstat2/index.php on line 90 Notice: Illegal string offset 'rx' in /usr/local/www/vnstat2/index.php on line 94 Notice: Illegal string offset 'tx' in /usr/local/www/vnstat2/index.php on line 95 Notice: Illegal string offset 'rx' in /usr/local/www/vnstat2/index.php on line 99 Notice: Illegal string offset 'tx' in /usr/local/www/vnstat2/index.php on line 100
This page contains the following errors:
error on line 11 at column 8: Failed to parse QName 'Notice:'
Below is a rendering of the page up to the first error. -
;D ;D ;D ;D ;D
This happened to me this afternoon (pic).
DO delete 1300 vnstat emails in a program as comfortable as ms outlook :P
-
not sure if this will help but the below patch corrects the "higher than set maximum 100 Mbit" error for me.. You could change the MaxBandwidth in the patch the max you have for your system..
--- /usr/local/pkg/vnstat2/vnstat2.inc 2014-06-12 21:21:08.000000000 -0400 +++ /root/custom/misc_files/vnstat2.inc 2014-06-22 10:39:15.000000000 -0400 @@ -91,6 +91,11 @@ # vnstati ## +# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature +# (unless interface specific limit is given) +MaxBandwidth 0 + + # image colors CBackground "F0F0F0" CEdge "AEAEAE"
-
I think one of the problems with the installation might be this around line 149 in:
https://github.com/pfsense/pfsense-packages/blob/master/config/vnstat2/vnstat2.inc
// Check for pbi install and arch type then create symlinks if (file_exists('/usr/pbi/vnstat-i386')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-i386/etc/vnstat.conf"); } if (file_exists('/usr/pbi/vnstat-amd64')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-amd64/etc/vnstat.conf"); }
trying this manually results in:
ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-i386/etc/vnstat.conf ln: /usr/pbi/vnstat-i386/etc/vnstat.conf: File exists
So vnstat2 keeps using the standard config and fails on us. Don't know about the packages installation logic but maybe just rm'ing the standard config first would do the trick?
-
Doing the following made it work here:
ln -sf /usr/local/etc/vnstat.conf /usr/pbi/vnstat-amd64/etc/vnstat.conf -
vnstat2 should be working fine now on 2.2, reinstall it and give it another try.