Vnstat2 Package Updated - Report/Feedback problems here.
-
Hi,
Sorry if this is a known issue, I noticed that the HOURS page is not distinguishing between AM and PM, everything is PM.
For example,
2P - 3P 327.22 MB 7.65 MB 334.87 MB
1P - 2P 33.21 MB 10.56 MB 43.77 MB
12P - 1P 20.08 MB 8.45 MB 28.53 MB
11P - 12P 29.58 MB 11.32 MB 40.90 MB
10P - 11P 19.75 MB 5.78 MB 25.53 MBpFsense release version: 2.1
pFsense architecture: amd64
pFsense filesystem: full
pFsense status: fresh install
Did you have vnstat installed before? No -
Hi,
Sorry if this is a known issue, I noticed that the HOURS page is not distinguishing between AM and PM, everything is PM.
For example,
2P - 3P 327.22 MB 7.65 MB 334.87 MB
1P - 2P 33.21 MB 10.56 MB 43.77 MB
12P - 1P 20.08 MB 8.45 MB 28.53 MB
11P - 12P 29.58 MB 11.32 MB 40.90 MB
10P - 11P 19.75 MB 5.78 MB 25.53 MBpFsense release version: 2.1
pFsense architecture: amd64
pFsense filesystem: full
pFsense status: fresh install
Did you have vnstat installed before? NoThanks for including the information. Looks a bug. I will have a look into it.
-
Had a look and I think this is the offending line. You can fix this by editing /usr/local/www/vnstat2/lang/en.php
%P doesn't seem to be supported on Freebsd. replace with %p instead or %H:%M for 24h. Examples below
%P not supported by strftime on Freebsd
$L['datefmt_hours'] = '%l%P';
Corrected line with the space
$L['datefmt_hours'] = '%l%p';
Or if your want 24h format instead
$L['datefmt_hours'] = '%H:%M';
Forked, edited and created a pull request to fix this for all languages as well as update French time to 21h00 format. You can see the pull request here for the vnstat_php_frontend git. I will roll in an update with the rest of the languages and some other misc fixes at a later time
-
Easy enough fix, thank you!
-
Easy enough fix, thank you!
No problem. Ill try to throw in a language select as well as at least fix this issue. Not going to happen until later this weekend though!
-
Thank you for updating the package. Works great :)
Just a heads up: you can grab version 1.5.2 from his github page, https://github.com/bjd/vnstat-php-frontend
I've been running it for a good while now without issues.
-
Thank you for updating the package. Works great :)
Just a heads up: you can grab version 1.5.2 from his github page, https://github.com/bjd/vnstat-php-frontend
I've been running it for a good while now without issues.
Thanks for the feedback! I am aware of the git I have an open pull request to fix hour format currently :)
-
Can you make a checkbox to make the stats persistent across reboots on nanobsd, please? ;)
-
Can you make a checkbox to make the stats persistent across reboots on nanobsd, please? ;)
Your saying that the database is not persistant on nanobsd? Was it persistant before? Can you please give more information including what is asked in my first post
-
Your saying that the database is not persistant on nanobsd?
Yes.
Was it persistant before? Can you please give more information including what is asked in my first post
No idea, never have been able to install the package before. Latest nanobsd i386 2.1.1 snapshot.
-
Your saying that the database is not persistant on nanobsd?
Yes.
Was it persistant before? Can you please give more information including what is asked in my first post
No idea, never have been able to install the package before. Latest nanobsd i386 2.1.1 snapshot.
I just threw together a fresh install of nanobsd amd64 2.1 and it works fine and is persistent.
You will have to provide much more information:
- ls -a /conf/vnstat and find / -name *vnstat* Before and After reboot
- More information of what exactly isn't working or even a picture
- Can you confirm no errors on package install?
-
https://github.com/pfsense/pfsense-packages/pull/607
AM/PM Time fix pull request.
-
Bryan…
I just wanted to say thanks for the fixed package. It's much appreciated and works well.
THANK YOU!!
-
Bryan…
I just wanted to say thanks for the fixed package. It's much appreciated and works well.
THANK YOU!!
Glad it is working well for you! Thanks for the feedback.
-
Hello,
work just fine so far; but after a renew dyn-dns I got from cron the message:
Subject: Cron root@pfsense/usr/local/pkg/vnstat2/vnstat2.sh
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 create database backup "/conf/vnstat/.vr0".
Error: Unable create database backup "/conf/vnstat/.vr1".
Error: Unable create database backup "/conf/vnstat/.ath0_wlan1".
Error: Unable create database backup "/conf/vnstat/.vr2".I'm using nanobsd on alix 2d3. It can't create since the root-fs it mounted ro.
Thanks,</user=root></logname=root></home=></path=></shell=>/root@pfsense
-
I'm using nanobsd on alix 2d3. It can't create since the root-fs it mounted ro.
Thanks, I forgot about this one. Turns out to be the issue why the stats just went AWOL on reboot here.
-
Hello,
work just fine so far; but after a renew dyn-dns I got from cron the message:
Subject: Cron root@pfsense/usr/local/pkg/vnstat2/vnstat2.sh
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=<br>on-Env: <user=root>Error: Unable create database backup "/conf/vnstat/.vr0".
Error: Unable create database backup "/conf/vnstat/.vr1".
Error: Unable create database backup "/conf/vnstat/.ath0_wlan1".
Error: Unable create database backup "/conf/vnstat/.vr2".I'm using nanobsd on alix 2d3. It can't create since the root-fs it mounted ro.
Thanks,</user=root></logname=<br></home=></path=></shell=>/root@pfsense
The sh script itself does rw then back to ro so you are going to have to post more information. System.log for sure. Also what are all your interface names?
I'm using nanobsd on alix 2d3. It can't create since the root-fs it mounted ro.
Thanks, I forgot about this one. Turns out to be the issue why the stats just went AWOL on reboot here.
Log? So you are confirming dyndns then no stats after reboot?
-
I guess you mean me: vr0 is WAN, vr1 LAN, vr2 DMZ and ath0_wlan1 my WiFi AP. No reboot since 25. February (install date of vnstat2). Uptime is 4 days.
Maybe it's a false positive, but I never got those mail from cron before and vnstat2 runs since 25.February? And today I renewed my dyn-ip from webgui.
I've got at 8.02 pm the mail subject "pfsense.home.lan - Notification" from my pfsense box:
DynDNS updated IP Address on WAN (vr0) to xxx.xxx.xxx.xxx
and at 8.03 pm the mentioned message from cron.
I've seen the logs (system.log) I see only about success about/from services_dyndns_edit.php on this time slice. cron doesn't seems to have a log into /var/logs at my box. Are you only interested in system.log?
-
I guess you mean me: vr0 is WAN, vr1 LAN, vr2 DMZ and ath0_wlan1 my WiFi AP. No reboot since 25. February (install date of vnstat2). Uptime is 4 days.
Maybe it's a false positive, but I never got those mail from cron before and vnstat2 runs since 25.February? And today I renewed my dyn-ip from webgui.
I've got at 8.02 pm the mail subject "pfsense.home.lan - Notification" from my pfsense box:
DynDNS updated IP Address on WAN (vr0) to xxx.xxx.xxx.xxx
and at 8.03 pm the mentioned message from cron.
I've seen the logs (system.log) I see only about success about/from services_dyndns_edit.php on this time slice. cron doesn't seems to have a log into /var/logs at my box. Are you only interested in system.log?
pFsense release version: 2.0.X?, 2.1, etc pFsense architecture: i386 or amd64 pFsense filesystem: full or nano pFsense status: fresh install, upgrade? If so from what version? Did you have vnstat installed before? Installation log from GUI Output of: find / -name \*vnstat\*
- Did vnstat continue to work? If not what are the symptoms?
- Is it still spitting out those errors?
/var/log/system.log
/tmp/php_errors.txt -
This could not have come at a better time! I just switched ISPs and my "patched" vnstat install took it really hard. I removed everything from the prior hackjob I had performed and reinstalled clean. Perfection!
I initially had the php frontend index error, but simply unchecked/saved then rechecked/saved the "enable php frontend" box and it fixed the issue.
Thanks guys!!