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

    VnStat does not work

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 2.6k 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.
    • T
      Tom7320
      last edited by

      Hi!

      I have a problem with vnStat 1.6.3 on pfSense 1.2.3-RELEASE (nanobsd). It worked until yesturday, than it suddenly stopped working. The web frontend complains about:

      
      Notice: Undefined index: totalrx in /usr/local/www/vnstat/index.php on line 77
      Notice: Undefined index: totalrxk in /usr/local/www/vnstat/index.php on line 77
      Notice: Undefined index: totaltx in /usr/local/www/vnstat/index.php on line 78
      Notice: Undefined index: totaltxk in /usr/local/www/vnstat/index.php on line 78 
      
      

      There is nothing in the logs which gave me a clue. I'm at a loss with that…. Help would be really appreciated!

      THX!

      Tom

      PS: It seems that the databse file does not exist:

      
      [root@pfsense.local]/root(6): vnstat
      Error:
      Unable to open database directory "/var/db/vnstat".
      Make sure it exists and is at least read enabled for current user.
      Exiting…
      [root@pfsense.local]/root(7): ls -l /var/db/
      total 12
      -rw-r–r--  1 root  wheel   78 Jan 23 20:24 captiveportal.db
      drwxr-xr-x  2 root  wheel  512 Jan 23 19:20 cpelements
      -rw-r--r--  1 root  wheel    0 Jan 23 20:25 currentipsecpinghosts
      drwxr-xr-x  2 root  wheel  512 Jan 23 19:19 entropy
      -rw-r--r--  1 root  wheel    0 Jan 23 19:20 ipsecpinghosts
      drwxr-xr-x  2 root  wheel  512 Jan 23 19:25 pingmsstatus
      drwxr-xr-x  2 root  wheel  512 Jan 23 19:25 pingstatus
      lrwxr-xr-x  1 root  wheel   17 Jan 23 19:19 pkg -> /root/var/db/pkg/
      drwxr-xr-x  2 root  wheel  512 Jan 23 19:21 rrd
      
      
      1 Reply Last reply Reply Quote 0
      • P
        Perry
        last edited by

        Vnstat on 1.2.3 nanobsd doesn't work as the db files will be removed on a reboot. So my guess would be that it has rebooted.

        /Perry
        doc.pfsense.org

        1 Reply Last reply Reply Quote 0
        • T
          Tom7320
          last edited by

          Ah, ok, I did not know that. I think you are right! Is there a way to have the db at a safe place to survive reboots?

          Tom

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

            No easy way to change things for 1.2.3 
            It should work on vnstat2 (pfSense 2.0)

            /Perry
            doc.pfsense.org

            1 Reply Last reply Reply Quote 0
            • T
              Tom7320
              last edited by

              OK, thanks a lot! I'm really looking forward for pfSense 2.0… :-)

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