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

    New Traffic Totals package available for testing

    Scheduled Pinned Locked Moved Traffic Monitoring
    121 Posts 37 Posters 54.7k 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.
    • jdillardJ
      jdillard
      last edited by

      vnStat is a just package dependency, the package shows up in Status > Traffic Totals and you have enable graphing in there. You can also run vnStat commands from the command prompt if you want after that.

      Once you enable it, you should have:

      */5	*	*	*	*	root	/usr/local/bin/vnstat -u
      

      in your cron jobs (you might have to install the Cron package to see it)

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

        Aha now I see.  I had to first disable it, then enable it, and only then did it add the vnstat cron entry.  Before I explicitly disabled it and reenabled it, the crontab entry was not there.  After I initially installed the package, it was enabled by default.  Perhaps a small bug?

        Thanks!

        1 Reply Last reply Reply Quote 0
        • jdillardJ
          jdillard
          last edited by

          Did you have vnStat already installed before you messed with the Traffic Totals package?

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

            Quite possible as I had vnstat2 installed, then upgraded from 2.1 to 2.2 before, which dropped support for vnstat2.  I never cleaned it out manually.

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              So I on accident deleted the vnstat cron job.  Not I can seem to get it back..  I have reinstalled the package, I have deleted the package and then reinstalled.  No cron.  I have disabled the cumulative graphing and then re-enabled it.. Nothing.  Reset all graph data.. Just not seem to put this cron job back in??

              I can manually put back, but shouldn't a reinstall of the package check that the cron is there.  Or a turn off and back on of the cumulative put it back, etc..?

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • jdillardJ
                jdillard
                last edited by

                @johnpoz:

                I can manually put back, but shouldn't a reinstall of the package check that the cron is there.  Or a turn off and back on of the cumulative put it back, etc..?

                It should, that's odd behavior that it won't add a cron on re-install. I'll have to look into it, it's related to #14 on the known issues list.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Well I can leave it as and see if it shows up when new version comes out, etc.

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • M
                    maverick_slo
                    last edited by

                    Hello!

                    Are any updates planned to make it to release that will happen soon?
                    Like correct iface names :) ?

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • D
                      drathus
                      last edited by

                      @jdillard:

                      #9a) NanoBSD image is untested at this time, but should work. Data loss after a reboot needs to also be tested (actually, I may be able to tie the data into backups).

                      Running on a modified Firebox, and I can confirm that it works on a nanoBSD image. However, yes, it's losing all data on reboot.

                      Edit: punctuation

                      1 Reply Last reply Reply Quote 0
                      • jdillardJ
                        jdillard
                        last edited by

                        @maverick_slo:

                        Hello!

                        Are any updates planned to make it to release that will happen soon?
                        Like correct iface names :) ?

                        Thanks!

                        I've been tied up with a roll out, but hope to have more time soon to get some fixes/features in.

                        1 Reply Last reply Reply Quote 0
                        • jdillardJ
                          jdillard
                          last edited by

                          @drathus:

                          @jdillard:

                          #9a) NanoBSD image is untested at this time, but should work. Data loss after a reboot needs to also be tested (actually, I may be able to tie the data into backups).

                          Running on a modified Firebox, and I can confirm that it works on a nanoBSD image. However, yes, it's losing all data on reboot.

                          Edit: punctuation

                          Thanks for confirming! I plan to mimic what is done for the RRD graphs as fas as data retention goes, but I'm not sure how involved that is quite yet.

                          1 Reply Last reply Reply Quote 0
                          • D
                            drathus
                            last edited by

                            @jdillard:

                            Thanks for confirming! I plan to mimic what is done for the RRD graphs as fas as data retention goes, but I'm not sure how involved that is quite yet.

                            How would you recommend manually backing up the vnstat database & configuration settings so if I do have to reboot my pfsense box I don't lose my historic data?

                            1 Reply Last reply Reply Quote 0
                            • B
                              baggar11
                              last edited by

                              I've noticed that there isn't a proper separation of totals for openvpn clients. I have 2 clients and they both show the same totals as WAN. Openvpn server does seem to have its own totals though. Does traffic totals have a limitation in this regard?

                              1 Reply Last reply Reply Quote 0
                              • G
                                gadean
                                last edited by

                                @drathus i've "solved" this with two scripts and cron - it's not the best solution but it works

                                #!/bin/sh
                                
                                if [ -d "/var/db/vnstat" ]; then
                                  cd / && tar -czf /cf/conf/vnstat.tgz /var/db/vnstat/*
                                fi
                                
                                
                                #!/bin/sh
                                
                                if [ -d "/var/db" ]; then
                                  cd / && tar -xzf /cf/conf/vnstat.tgz
                                fi
                                
                                
                                0       */1     *       *       *       root    /etc/rc.backup_vnstat.sh
                                @reboot                                 root    /etc/rc.restore_vnstat.sh
                                
                                
                                1 Reply Last reply Reply Quote 0
                                • T
                                  TomT
                                  last edited by

                                  Hi

                                  Where do I get this to try ?
                                  I don't see it in my packages

                                  Thanks

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    gadean
                                    last edited by

                                    The package name is "Status_Traffic_Totals".

                                    1 Reply Last reply Reply Quote 0
                                    • I
                                      infernoman
                                      last edited by

                                      Is there any way to get this to enable by default? every time the machine is restarted it seems to stop the logging. and delete any trace of the logs.

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        gadean
                                        last edited by

                                        Are you using the ram disk? then you could try this on: https://forum.pfsense.org/index.php?topic=114753.msg664804#msg664804

                                        Under "Status" / "Traffic Totals" click on "Display Advanced" -> "Enable Graphing" and "Save as Default"

                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          chrcoluk
                                          last edited by

                                          why not just use the drive pfsense is installed on? my pfsense is installed on a 60 gig ssd, plenty of space for storing this sort of data :)

                                          pfSense CE 2.7.2

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

                                            @jdillard:

                                            Known issues:

                                            #1) There is an issue with the stacked bar graph. Documented here: https://github.com/novus/nvd3/issues/341#issuecomment-222370991

                                            I believe I may have found another bug that only occurs with the stacked bar graph. I have been collecting data for a couple of days now and all totals look fine except with stacked bars (see image): for some reason the (rx) values are displayed as KiB instead of GiB and the resulting higher values seem to hit a type related cap and show up as negatives .

                                            This is from a pfSense 2.3.2 (latest) on an ALIX APU.1D4.

                                            Edit: This only occurs with inverse mode on. Btw. would it be possible to save defaults for Hourly and Daily etc. separately?

                                            Status_Traffic_Totals-Stacked-Bars.PNG
                                            Status_Traffic_Totals-Stacked-Bars.PNG_thumb

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