Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Vnstat2 Package Updated - Report/Feedback problems here.

    Scheduled Pinned Locked Moved pfSense Packages
    39 Posts 13 Posters 7.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      doktornotor Banned
      last edited by

      @petzi:

      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.

      1 Reply Last reply Reply Quote 0
      • B
        bryan.paradis
        last edited by

        @petzi:

        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?

        @doktornotor:

        @petzi:

        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?

        1 Reply Last reply Reply Quote 0
        • P
          petzi
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • B
            bryan.paradis
            last edited by

            @petzi:

            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\*
            
            
            1. Did vnstat continue to work? If not what are the symptoms?
            2. Is it still spitting out those errors?

            /var/log/system.log
            /tmp/php_errors.txt

            1 Reply Last reply Reply Quote 0
            • L
              loupalladino
              last edited by

              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!!

              1 Reply Last reply Reply Quote 0
              • B
                bryan.paradis
                last edited by

                @loupalladino:

                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!!

                Been thinking about the initial issue of it being checked but the files haven't been copied. On uninstall configuration.XML still keeps configuration for the front end and interfaces on uninstall. Might have to add a check for that. Thanks for feedback.

                Just to note the fix for AM/PM was merged in today

                1 Reply Last reply Reply Quote 0
                • P
                  petzi
                  last edited by

                  @bryan.paradis:

                  
                  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\*
                  
                  
                  1. Did vnstat continue to work? If not what are the symptoms?
                  2. Is it still spitting out those errors?

                  /var/log/system.log
                  /tmp/php_errors.txt

                  I'm using 2.1/i386 fresh install with the nano filesystem (nano-bsd on embedded, alix 2d3)
                  I did install the older vnstat2 package before which failed and did wait until the actually was released.

                  
                  find / -name \*vnstat\*
                  /cf/conf/vnstat
                  /root/var/db/pbi/installed/vnstat-1.11_1-i386
                  /root/var/db/pbi/.hashqueue/vnstat-1.11_1-i386
                  /root/tmp/apkg_vnstat-1.11_1-i386.pbi
                  /tmp/lighttpdcompress/vnstat2
                  /tmp/vnstat2.info
                  /usr/local/pkg/vnstat2.xml
                  /usr/local/pkg/vnstat2
                  /usr/local/pkg/vnstat2/vnstat2.inc
                  /usr/local/pkg/vnstat2/vnstat2.sh
                  /usr/local/pkg/vnstat2/vnstat_php_frontend
                  /usr/local/pkg/vnstat2/vnstat_php_frontend/vnstat.php
                  /usr/local/pkg/vnstati.xml
                  /usr/local/pkg/vnstatoutput.xml
                  /usr/local/bin/vnstat
                  /usr/local/bin/vnstati
                  /usr/local/sbin/vnstatd
                  /usr/local/etc/vnstat.conf.sample
                  /usr/local/etc/vnstat.conf
                  /usr/local/www/diag_vnstat.php
                  /usr/local/www/diag_vnstat2.php
                  /usr/local/www/vnstat2_img.php
                  /usr/local/www/vnstati.php
                  /usr/local/www/vnstat2
                  /usr/local/www/vnstat2/vnstat.php
                  /usr/local/man/man5/vnstat.conf.5.gz
                  /usr/local/man/man1/vnstat.1.gz
                  /usr/local/man/man1/vnstatd.1.gz
                  /usr/local/man/man1/vnstati.1.gz
                  /usr/pbi/vnstat-i386
                  /usr/pbi/vnstat-i386/bin/vnstat
                  /usr/pbi/vnstat-i386/bin/vnstati
                  /usr/pbi/vnstat-i386/etc/vnstat.conf.sample
                  /usr/pbi/vnstat-i386/etc/vnstat.conf
                  /usr/pbi/vnstat-i386/sbin/vnstatd
                  /usr/pbi/vnstat-i386/var/db/vnstat
                  /usr/pbi/vnstat-i386/.sbin/vnstat
                  /usr/pbi/vnstat-i386/.sbin/vnstat.pbiopt
                  /usr/pbi/vnstat-i386/.sbin/vnstat.ldhints
                  /usr/pbi/vnstat-i386/.sbin/vnstatd
                  /usr/pbi/vnstat-i386/.sbin/vnstatd.pbiopt
                  /usr/pbi/vnstat-i386/.sbin/vnstatd.ldhints
                  /usr/pbi/vnstat-i386/.sbin/vnstati
                  /usr/pbi/vnstat-i386/.sbin/vnstati.pbiopt
                  /usr/pbi/vnstat-i386/.sbin/vnstati.ldhints
                  
                  

                  cat /tmp/php_errors.txt got nothings - empty

                  relevant time slice of /var/log/system.log

                  
                  Feb 28 01:01:03 pfsense php: rc.dyndns.update: phpDynDNS (all.dnsomatic.com): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
                  Feb 28 20:00:27 pfsense php: /index.php: Successful login for user 'admin' from: 192.168.1.11
                  Feb 28 20:00:27 pfsense php: /index.php: Successful login for user 'admin' from: 192.168.1.11
                  Feb 28 20:03:16 pfsense check_reload_status: Syncing firewall
                  Feb 28 20:03:17 pfsense php: /services_dyndns_edit.php: DynDns: updatedns() starting
                  Feb 28 20:03:17 pfsense php: /services_dyndns_edit.php: DynDns (all.dnsomatic.com): <my-ip>extracted from local system.
                  Feb 28 20:03:17 pfsense php: /services_dyndns_edit.php: DynDNS (all.dnsomatic.com): running get_failover_interface for wan. found vr0
                  Feb 28 20:03:17 pfsense php: /services_dyndns_edit.php: DynDNS (all.dnsomatic.com): DynDns _update() starting.
                  Feb 28 20:03:17 pfsense php: /services_dyndns_edit.php: DNS-O-Matic: DNS update() starting.
                  Feb 28 20:03:18 pfsense php: /services_dyndns_edit.php: DynDNS (all.dnsomatic.com): DynDns _checkStatus() starting.
                  Feb 28 20:03:18 pfsense php: /services_dyndns_edit.php: DynDNS (all.dnsomatic.com): Current Service: dnsomatic
                  Feb 28 20:03:18 pfsense php: /services_dyndns_edit.php: DynDns (all.dnsomatic.com): <my-ip>extracted from local system.
                  Feb 28 20:03:21 pfsense php: /services_dyndns_edit.php: Message sent to <my_mail>OK
                  Feb 28 20:03:21 pfsense php: /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wandnsomatic'all.dnsomatic.com'1.cache: 77.64.174.226
                  Feb 28 20:03:21 pfsense php: /services_dyndns_edit.php: DNS-O-Matic (all.dnsomatic.com): (Success) IP Address Changed Successfully! (<my-ip>)
                  Feb 28 20:04:04 pfsense check_reload_status: Syncing firewall
                  Feb 28 20:04:05 pfsense php: /services_dyndns_edit.php: DynDNS (<my_fqdn>): Processing dummy update on No-IP free account. IP temporarily set to 192.168.1.1
                  Feb 28 20:04:05 pfsense php: /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wannoip-free'<my-fqdn>'0.cache: <my-ip>Feb 28 20:04:05 pfsense php: /services_dyndns_edit.php: phpDynDNS (petzihome.no-ip.biz): (Success) DNS hostname update successful.
                  Feb 28 20:04:06 pfsense php: sendmail: Message sent to yMY-MAIL> OK
                  Feb 28 20:04:16 pfsense php: /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wannoip-free'<my-fqdn>'0.cache: 77.64.174.226
                  Feb 28 20:04:16 pfsense php: /services_dyndns_edit.php: phpDynDNS (<my-fqdn>): (Success) DNS hostname update successful.
                  Feb 28 20:11:15 pfsense check_reload_status: Syncing firewall</my-fqdn></my-fqdn></my-ip></my-fqdn></my_fqdn></my-ip></my_mail></my-ip></my-ip> 
                  

                  cat /tmp/vnstat2.info

                  
                  Loading package instructions....
                  Custom commands...
                  Executing custom_php_install_command()...done.
                  Menu items... done.
                  Integrated Tab items... done.
                  Writing configuration... done.
                  
                  Installation completed.   Please check to make sure that the package is configured from the respective menu then start the package.
                  
                  

                  The interesting part is that each time I call vnstat2 from menu I have to configure it again, e.g.

                  If I change it to WAN and save, next time I have to perform this again. Is this intentionally?

                  1 Reply Last reply Reply Quote 0
                  • B
                    bryan.paradis
                    last edited by

                    Yes I believe so. The PHP frontend option should be sticky. Everything working?

                    1 Reply Last reply Reply Quote 0
                    • P
                      petzi
                      last edited by

                      @bryan.paradis:

                      Yes I believe so. The PHP frontend option should be sticky. Everything working?

                      I see my stats since date of install, so far OK. No idea about point of reboot.

                      1 Reply Last reply Reply Quote 0
                      • B
                        bryan.paradis
                        last edited by

                        @doktornotor:

                        @petzi:

                        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.

                        His stats are there since install? I am not sure how it correlates to your problem of stats going AWOL on reboot.

                        @petzi:

                        @bryan.paradis:

                        Yes I believe so. The PHP frontend option should be sticky. Everything working?

                        I see my stats since date of install, so far OK. No idea about point of reboot.

                        So you have received just one email from cron complaining that vnstat couldn`t create backups? Is it possible that the dyndns set the filesystem back to Read only after the vnstat script set it to read write and so it failed? This script gets run every minute by cron so I guess this may be possible that the timing just aligned perfectly.

                        1 Reply Last reply Reply Quote 0
                        • P
                          petzi
                          last edited by

                          @bryan.paradis:

                          So you have received just one email from cron complaining that vnstat couldn`t create backups? Is it possible that the dyndns set the filesystem back to Read only after the vnstat script set it to read write and so it failed? This script gets run every minute by cron so I guess this may be possible that the timing just aligned perfectly.

                          I've no idea. Probably mounting rw/ro isn't logged.

                          1 Reply Last reply Reply Quote 0
                          • B
                            bryan.paradis
                            last edited by

                            @petzi:

                            @bryan.paradis:

                            So you have received just one email from cron complaining that vnstat couldn`t create backups? Is it possible that the dyndns set the filesystem back to Read only after the vnstat script set it to read write and so it failed? This script gets run every minute by cron so I guess this may be possible that the timing just aligned perfectly.

                            I've no idea. Probably mounting rw/ro isn't logged.

                            If it happened only once? It must have been the fluke lining up of filesystem getting switched back after the rw call was made by the script.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.