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

    BandwidthD - inaccurate logging to PostgreSQL database

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 1.8k 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.
    • S
      slth
      last edited by

      Following on Tracking bandwidth usage per ip per day and vnstat "like" package to monitor bandwidth usage PER LAN IP {NOW $280USD} I've set up BandwidthD on my pfSense box with logging to a remote PostgreSQL database.
      This is working pretty well, except for the amount of data which has been logged to the database.

      In order to test accuracy, I downloaded a 100mb test bin file from a speedtest site. Record in database is showing as:

      id      ip              timestamp              sample_duration      total icmp udp tcp  ftp    http  p2p

      1 192.168.0.2 2011-11-30 20:43:13.392453+01 200 105830 0 0 105829 0 105321 0

      I presume all measurements are in kilobytes. 105321 kilobytes logged for http actually is 102.85254 megabyte.
      This is only 2,85% off, but when I tried to replicate this bug I found values that were 6% and more off, which to me is quite significant.

      Does someone know what might cause this deviation?

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

        Might be due to retransmission of packets to deal with lost, delayed or damaged packets during the file transfer.

        And there is overhead…

        The amount of data transferred and reported by BandwidthD will always be a little more than the size of the file transferred.

        --brock

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