Project

General

Profile

Actions

Todo #9392

closed

Status_Traffic_Totals needs updated for vnstat 2.0

Added by Jim Pingle about 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Status Traffic Totals
Target version:
Start date:
03/11/2019
Due date:
% Done:

100%

Estimated time:
Plus Target Version:

Description

In the FreeBSD ports repository, vnstat has been upgraded to vnstat 2.0 (from 1.15).

vnstat 2.0 does not appear to work properly with the Status_Traffic_Totals package, so the package needs updated to handle the changes in vnstat 2.0.


Files

Actions #1

Updated by Jim Pingle over 4 years ago

Affects both 2.5.0 and 2.4.5

Actions #2

Updated by Jim Pingle over 4 years ago

  • Target version set to 2.4.5
Actions #3

Updated by Jim Pingle over 4 years ago

  • Status changed from New to In Progress
  • Assignee changed from Jared Dillard to Jim Pingle

I'm looking at this. Needs a bit of work, lots of big changes between 1.x and 2.x.

Actions #4

Updated by Jim Pingle over 4 years ago

  • Assignee changed from Jim Pingle to Jared Dillard
  • % Done changed from 0 to 90

I committed my progress so far. All of the backend code should be OK now. See the commit message for details.

devel: https://github.com/pfsense/FreeBSD-ports/commit/716da29887a02922ddb4eb5e59702ef048be759f
RELENG_2_4_5: https://github.com/pfsense/FreeBSD-ports/commit/3e425a7a6592c0b42c3fbbb6771dd3e098801d5c

The frontend still needs some work. The JSON format changed so the code likely needs more adjustments than what I found already.

Actions #5

Updated by Jim Pingle over 4 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 90 to 100

Jared pushed the remaining required fixes yesterday, so it should be ready to test once that's in snapshots

Actions #6

Updated by Jim Pingle over 4 years ago

  • Status changed from Feedback to Resolved

I've tried this on a variety of 2.4.5 and 2.5.0 systems both CE and Factory and with pkg version 2.3 it seems to be OK. Data is still there after a reinstall on the new version as well.

If new problems are discovered, they can be handled on individual new issues as needed.

Actions #7

Updated by Michael Kellogg over 4 years ago

something is off in units on 2.5 at least since up date from 12:00 to 2:30 in morning and on 18M dsl its already showing Tib of traffic

Actions #9

Updated by Jim Pingle over 4 years ago

  • Status changed from Resolved to In Progress

I'm seeing that now as well. The command line shows what appears to be more accurate data.

: vnstat -d 

 WAN (vmx0)  /  daily

          day        rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     2020-01-10   447.36 MiB |  431.32 MiB |  878.68 MiB |   85.31 kbit/s
     2020-01-11   194.85 MiB |  631.30 MiB |  826.15 MiB |   80.21 kbit/s
     2020-01-12   194.53 MiB |  631.03 MiB |  825.56 MiB |   80.15 kbit/s
     2020-01-13   489.36 MiB |  643.53 MiB |    1.11 GiB |  109.99 kbit/s
     2020-01-14   165.94 MiB |  243.08 MiB |  409.02 MiB |  104.93 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated    438.45 MiB |  642.26 MiB |    1.06 GiB |

Might be a units issue as the CLI data shows MiB and the GUI seems to think it's GiB but the numbers seem to . So maybe the GUI is applying a calculation to the data it doesn't need from this version.

Actions #10

Updated by Jim Pingle over 4 years ago

  • Assignee changed from Jared Dillard to Jim Pingle

I have a fix for this. Values are coming in Bytes by default, old base was KiB, so it needs adjusted to match.

Actions #11

Updated by Jim Pingle over 4 years ago

  • Status changed from In Progress to Feedback

Try again once pkg 2.3.1 is available with the next snapshot run.

Actions #12

Updated by Jim Pingle over 4 years ago

  • Status changed from Feedback to Resolved

Totals match up with expectations on pkg v 2.3.1.

Actions

Also available in: Atom PDF