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

    vnstat in pfSense 2.4.5

    Scheduled Pinned Locked Moved pfSense Packages
    vnstat
    7 Posts 3 Posters 2.2k 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.
    • H
      highc
      last edited by highc

      Because of the snort package and dependencies, I had to upgrade vom pfSense 2.4.4p3 to 2.4.5. Things are generally working fine, except for vnstat, which is producing the below error:

      Error: Failed to open database "/var/db/vnstat/vnstat.db" in read-only mode.
      The vnStat daemon should have created the database when started.
      Check that it is configured and running. See also "man vnstatd".
      

      /var/db/vnstat/vnstat.db does not exist at all, there are individual files per interface.

      I have seen that vnstat is not currently maintained. And I have googled around, and found (besides a related bug report) that the manual of vnstat suggests that -u is a very common parameter. So it would seem to me that I cannot get vnstat to work with config changes, but that a newly compiled version would be required...?

      Any hint on what I could do? A daily mail with vnstat produced traffic graphs was a great help for me to determine if something is grossly out of bounds...

      Thanks!

      pfSense+ 24.03 on Netgate SG-2100 (replaced SG-2440)
      pfSense 2.6 on Super Micro 5018D-FN4T (retired)

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Did you install it manually? vnstat 2.0 has a bunch of changes from the older version.

        The Status_Traffic_Totals package uses vnstat as a backend and it handles all the setup. You would need to at least go in and enable it there.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • H
          highc
          last edited by highc

          Yes, I did install it via the Status_Traffic_Totals package. Output data from that package in the GUI stops as of the update date, April 26. I've just created new graphs, showing nothing since April 26:

          7e0de807-0ef8-4a70-bdf9-4ef041cc3dc2-grafik.png

          And shouldn't there be some data in the "Data Summary"?

          pfSense+ 24.03 on Netgate SG-2100 (replaced SG-2440)
          pfSense 2.6 on Super Micro 5018D-FN4T (retired)

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            There should be, yes. Click the button to reset graphing data and see what happens after that.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • kiokomanK
              kiokoman LAYER 8
              last edited by kiokoman

              but traffic total is broken afaik under 2.4.5
              https://redmine.pfsense.org/issues/10429
              https://forum.netgate.com/topic/151914/traffic-totals-hourly-report-problem/

              command line should work tho

              [2.4.5-RELEASE][root@pfSense.trmultiservice.lab]/root: rm /var/db/vnstat/vnstat.db
              
              [2.4.5-RELEASE][root@pfSense.trmultiservice.lab]/root: /usr/local/sbin/vnstatd -d
              No interfaces found in database, adding available interfaces...
              Interface "em0" added with 1000 Mbit bandwidth limit.
              Interface "em1" added with 1000 Mbit bandwidth limit.
              Interface "em2" added with 1000 Mbit bandwidth limit.
              Interface "enc0" added with 1000 Mbit bandwidth limit.
              Interface "pflog0" added with 1000 Mbit bandwidth limit.
              Interface "pfsync0" added with 1000 Mbit bandwidth limit.
              Interface "gif0" added with 1000 Mbit bandwidth limit.
              Interface "ovpnc1" added with 1000 Mbit bandwidth limit.
              -> 8 new interfaces found.
              Limits can be modified using the configuration file. See "man vnstat.conf".
              Unwanted interfaces can be removed from monitoring with "vnstat --remove".
              
              [2.4.5-RELEASE][root@pfSense.trmultiservice.lab]/root: vnstat -h -i em0
               em0: Not enough data available yet.
              

              after 1 hour more or less

              [2.4.5-RELEASE][root@pfSense.trmultiservice.lab]/root: vnstat -h -i em0
              
               em0  /  hourly
              
                       hour        rx      |     tx      |    total    |   avg. rate
                   ------------------------+-------------+-------------+---------------
                   2020-04-28
                       18:00    458.07 MiB |   38.83 MiB |  496.90 MiB |    1.16 Mbit/s
                       19:00    784.38 MiB |   54.92 MiB |  839.30 MiB |    3.91 Mbit/s
                   ------------------------+-------------+-------------+---------------
              

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                It's really not broken on 2.4.5 in general. Maybe a couple edge cases (like hourly always being cumulative no matter which option you choose). In general it's fine.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • H
                  highc
                  last edited by

                  Ok, so resetting the data has helped a bit. I've waited before coming back, because I'd hoped that the daily data would recover, but there is still no data there under "Data Summary". However, the rest appears to be working meanwhile.

                  I'll say "thanks!" at this point, because with this, I can get the e-mails to me working again, which is the part I need.

                  Thanks!

                  pfSense+ 24.03 on Netgate SG-2100 (replaced SG-2440)
                  pfSense 2.6 on Super Micro 5018D-FN4T (retired)

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