pfSense Gold Subscription

Author Topic: RRD Summary calculating last month wrong  (Read 713 times)

0 Members and 1 Guest are viewing this topic.

Offline chalur

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
RRD Summary calculating last month wrong
« on: March 02, 2016, 12:43:01 pm »
So when I looked on feb 29th, I was seeing that I had used about 290 GB of data in the current month. However, now that it's now march 2nd, I would think the number for "last month" would be pretty close to what "current month" was on the 29th, but instead it's showing that I used about 3.45 TB of data.

Screenshot of current stats:
https://i.imgur.com/VDjq5p2.png

Screenshot of corresponding RRD graphs:
https://i.imgur.com/WOrlGTn.png

The graphs pretty clearly show that I haven't used anywhere near 3.5 TB, so I assume the summary tool is calculating something wrong. Is this a bug other people have run into and/or is there something I've configured wrong?

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 534
  • Karma: +124/-1
  • Web Dude
    • View Profile
    • Personal Website
Re: RRD Summary calculating last month wrong
« Reply #1 on: March 02, 2016, 06:23:23 pm »
I have a feeling it is the RRD Summary package, as the code built into the RRD graphing utilities is probably better than hand coding from rrdfetch if you want to obtain totals for a time period. Here is the RRD Summary code:

https://github.com/pfsense/FreeBSD-ports/blob/devel/sysutils/pfSense-pkg-RRD_Summary/files/usr/local/www/status_rrd_summary.php#L47

Offline chalur

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RRD Summary calculating last month wrong
« Reply #2 on: March 02, 2016, 07:11:54 pm »
What's interesting is it calculates this month fine, just not last month. I wonder if something changed about the way it formats dates or the proper resolution for the data is different. Either way, I don't know nearly enough to have any hope of fixing that myself.

Offline jdillard

  • Administrator
  • Sr. Member
  • *****
  • Posts: 534
  • Karma: +124/-1
  • Web Dude
    • View Profile
    • Personal Website
Re: RRD Summary calculating last month wrong
« Reply #3 on: December 05, 2016, 12:17:31 pm »
Razzfazz was kind enough to submit a PR: https://github.com/pfsense/FreeBSD-ports/pull/185

It just got merged, so you should be able to test in snapshots soon enough.