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

    Traffic Totals Hourly Report Problem

    Scheduled Pinned Locked Moved Traffic Monitoring
    46 Posts 10 Posters 13.0k 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
      hulleyrob @pwnell
      last edited by

      @pwnell Thank you this fixed my current problem where the hourly graph looked like the first image since I did a fresh install of 2.4.5

      1 Reply Last reply Reply Quote 0
      • MikeV7896M
        MikeV7896
        last edited by

        Yeah, if this is an issue, someone should write up a bug in Redmine (use the pfSense Packages section and the Status Traffic Totals category) and then update the package in Github so everyone can benefit from the change and easily apply a system patch in the meantime. Manually changing files works great until a file you changed is updated, then your change disappears. At least a system patch can be re-applied without re-editing the file.

        The S in IOT stands for Security

        Y 1 Reply Last reply Reply Quote 0
        • H
          hulleyrob
          last edited by

          @pwnell said in Traffic Totals Hourly Report Problem:

          value.time.hour

          Just tried to create a pull request on GitHub what a mess that turned out to be. IF I have time later will try and do something in a non web version but that wasn't easy at all and it was a simple change to fix the hourly display on 2.4.5

          Y 1 Reply Last reply Reply Quote 0
          • Y
            YannTKO @MikeV7896
            last edited by

            @virgiliomi said in Traffic Totals Hourly Report Problem:

            Yeah, if this is an issue, someone should write up a bug in Redmine (use the pfSense Packages section and the Status Traffic Totals category) and then update the package in Github so everyone can benefit from the change and easily apply a system patch in the meantime. Manually changing files works great until a file you changed is updated, then your change disappears. At least a system patch can be re-applied without re-editing the file.

            you can solve this issue by editing the file:
            /usr/local/pkg/status_traffic_totals.inc

            @YannTKO said in Traffic Totals Hourly Report Problem:

            Beware, when you change your settings in traffic totals by the webgui and you save them as defaults, the file vnstat.conf is written again and you loose your data retention durations selection you choosed by editing this file.
            If you want to keep your selection or your options, you must edit the file /usr/local/pkg/status_traffic_totals.inc
            This one is used to create vnstat.conf

            Yann.

            Netgate SG-3100 23.09.1
            Unifi UAP: 1x FlexHD + 2x nanoHD + 1x AC-IW | Unifi USW: 1x16-PoE Gen2 + 4x US-8-60W | Cloudkey Gen2 Plus
            1 x NUC8i7BEH 32Go - ESXI 8 (Pfsense + many VM)

            1 Reply Last reply Reply Quote 0
            • Y
              YannTKO @hulleyrob
              last edited by

              @hulleyrob said in Traffic Totals Hourly Report Problem:

              @pwnell said in Traffic Totals Hourly Report Problem:

              value.time.hour

              Just tried to create a pull request on GitHub what a mess that turned out to be. IF I have time later will try and do something in a non web version but that wasn't easy at all and it was a simple change to fix the hourly display on 2.4.5

              It has been already done :
              redmine.pfsense.org/issues/10429

              Netgate SG-3100 23.09.1
              Unifi UAP: 1x FlexHD + 2x nanoHD + 1x AC-IW | Unifi USW: 1x16-PoE Gen2 + 4x US-8-60W | Cloudkey Gen2 Plus
              1 x NUC8i7BEH 32Go - ESXI 8 (Pfsense + many VM)

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

                I have the same issues too... First i thought i was the only one to have issues until i saw this thread :) .. I just installed it and then removed it again when it turned out it was not working properly..

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

                  @YannTKO said in Traffic Totals Hourly Report Problem:

                  /usr/local/pkg/status_traffic_totals.inc

                  guess I am dumb and dont understand what to change in this file, any push in the right direction?

                  H 1 Reply Last reply Reply Quote 0
                  • H
                    hulleyrob @MyKroFt
                    last edited by

                    @MyKroFt so you are happy to get to the file and edit it on the command line?

                    I just open it with VI find "value.id" this and the first line that matched was the one in the post above by @pwnell

                    "var date = Date.UTC(value.date.year, value.date.month-1, value.date.day, value.id);"

                    then edit value.id to value.time.hour

                    This fixed the hourly graphs for me which is all I was interested in. Save then quit and refresh the page job done.

                    1 Reply Last reply Reply Quote 0
                    • Y
                      YannTKO
                      last edited by YannTKO

                      Editing /usr/local/pkg/status_traffic_totals.inc is just to keep data retention choice.
                      Editing status_traffic_totals.php is to solve the hourly/10 days graphical issues.
                      Yann.

                      Netgate SG-3100 23.09.1
                      Unifi UAP: 1x FlexHD + 2x nanoHD + 1x AC-IW | Unifi USW: 1x16-PoE Gen2 + 4x US-8-60W | Cloudkey Gen2 Plus
                      1 x NUC8i7BEH 32Go - ESXI 8 (Pfsense + many VM)

                      H N 2 Replies Last reply Reply Quote 0
                      • H
                        hulleyrob @YannTKO
                        last edited by

                        @YannTKO sorry you are correct it was the PHP file I edited, early morning here coffee not kicked in yet.

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

                          thank you, knowing it was the .php instead of .inc made sense and was able to edit the file

                          thanks

                          1 Reply Last reply Reply Quote 0
                          • N
                            NinthWave @YannTKO
                            last edited by

                            @yanntko said in Traffic Totals Hourly Report Problem:

                            Editing /usr/local/pkg/status_traffic_totals.inc is just to keep data retention choice.
                            Editing status_traffic_totals.php is to solve the hourly/10 days graphical issues.
                            Yann.

                            Thank you for pointing me here.

                            This thread as started in July and and the problem is stil pending ?

                            I am in /user/local/pkg but there is no file status_traffic_totals.php

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

                              huh.. The file you want to edit is

                              [2.4.5-RELEASE][admin@sg4860.local.lan]/usr/local/www: ls status_traffic_totals.php 
                              status_traffic_totals.php
                              [2.4.5-RELEASE][admin@sg4860.local.lan]/usr/local/www: 
                              

                              This looks like it was fixed back in nov
                              https://github.com/pfsense/FreeBSD-ports/commit/dcb4949cc70f78006d05c662aa81c5849f93d4c0#diff-cbd6e5b8cd0fd83476715c17fdb47eec98bd0b54a6426f7dc7cfaeea141f7a4c

                              But shows that it should be 2.3.2, but that is not what is being pulled down - only 2.3.1_1

                              Without looking deeper - my guess would be that 2.3.2 is for 2.5 and not 2.4.5.. I fixed it with simple edit.. So I haven't really spent much time looking..

                              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.7.2, 24.11

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                NinthWave @johnpoz
                                last edited by

                                @johnpoz
                                I have opened the php file but cannot find "HourlyDays".

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

                                  No idea why you would think you would find anything like that?

                                  Look in the link I provided for exactly what needs to be changed.

                                  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.7.2, 24.11

                                  N 1 Reply Last reply Reply Quote 0
                                  • N
                                    NinthWave @johnpoz
                                    last edited by

                                    @johnpoz
                                    I am sorry but GitHub is not my specialty. Is this a patch I am suppose to apply or edit the file munually ?

                                    I tried with the patch system and I get a reply that it cannot be applied safely.

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

                                      In the link I posted to - see the green vs the red..

                                      You change the red line to look like the green line.. Its really a couple of characters to change..

                                      You change value.id, to be value.time.hour on one line

                                      And then change the value.id+1 to index on the 3 other lines.

                                      Or just not worry about it until they release the update.. Its not like it has anything to do with anything... Its reporting the amount of traffic..

                                      I hadn't even noticed it - because I normally just look at the month graph ;)

                                      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.7.2, 24.11

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        NinthWave @johnpoz
                                        last edited by

                                        @johnpoz
                                        Where is this file ?
                                        c1ebc518-7b50-489b-8782-2496e76f8707-image.png

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

                                          Really? Dude in the same post where I give the link, I give the path to where the file is..

                                          What I would suggest - is you just not worry about it, until the package is actually updated, or 2.5 comes out and you move to that..

                                          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.7.2, 24.11

                                          N 1 Reply Last reply Reply Quote 0
                                          • N
                                            NinthWave @johnpoz
                                            last edited by

                                            @johnpoz
                                            32fe95b2-7a26-42f9-85a6-1ed3f8287b3f-image.png
                                            Duh! Yeah, sorry I missed it.

                                            The reason I am trying to have this working is that it's the easiest way to see at what time the kid (stepson) went to bed. A lot of traffic at lets say 3AM means he is still up watching stupid Youtuber.

                                            I have schedules and rules but I am not the one deciding to enable/disable them. I am just a clerk here in terms of the teen's management. 😞

                                            But a 3AM bed time along with bad marks at school miraculously allow one clerk to re-enable the schedules.

                                            ntop gives pretty granular data about the traffic but surprisingly, unless I missed that as well, not a simple report of just which IP (LAN) was active when. I really miss YaMON in that regard.

                                            Thanks again.

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