Project

General

Profile

Bug #9537

One month offset in displayed data between time changes

Added by Michael Virgilio about 1 year ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Status Traffic Totals
Target version:
-
Start date:
05/19/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

There is a bug in the Status > Traffic Totals package with a one-month offset in displaying data. The offset occurs and resolves in the months where there is a transition between summer time and regular time.

For example, in the US, summer time ends in November. The extra hour in the month causes November to appear twice in the table and graph. Summer time starts in March, so there is the loss of an hour, causing March to not appear in the data table and graph. Technically, December is showing as the second November entry, January is showing as December, etc., but the one hour offset causes the data to be displayed incorrectly.

My guess is that the inconsistency is due to a difference in time zone handling between the tool(s) doing the logging and the web interface. One is likely using GMT (which doesn't reflect a difference between summer time and regular time) and the other is likely using the local time zone.

History

#1 Updated by Randall Barth 2 months ago

The underlying vnstat correctly reports the monthly data when run from the command line.

This is from vnstat:

vnstat -m 12 -i em0

WAN (em0)  /  monthly
month        rx      |     tx      |    total    |   avg. rate
------------------------+-------------+-------------+---------------
2019-06 491.75 GiB | 82.48 GiB | 574.22 GiB | 1.90 Mbit/s
2019-07 885.38 GiB | 73.53 GiB | 958.91 GiB | 3.08 Mbit/s
2019-08 324.23 GiB | 64.81 GiB | 389.04 GiB | 1.25 Mbit/s
2019-09 321.16 GiB | 75.41 GiB | 396.56 GiB | 1.31 Mbit/s
2019-10 517.49 GiB | 66.30 GiB | 583.80 GiB | 1.87 Mbit/s
2019-11 698.91 GiB | 102.15 GiB | 801.06 GiB | 2.65 Mbit/s
2019-12 784.68 GiB | 157.00 GiB | 941.68 GiB | 3.02 Mbit/s
2020-01 664.14 GiB | 317.94 GiB | 982.08 GiB | 3.15 Mbit/s
2020-02 480.74 GiB | 300.31 GiB | 781.05 GiB | 2.68 Mbit/s
2020-03 538.28 GiB | 235.33 GiB | 773.61 GiB | 2.48 Mbit/s
2020-04 639.36 GiB | 319.21 GiB | 958.57 GiB | 3.18 Mbit/s
2020-05 936.89 MiB | 327.59 MiB | 1.23 GiB | 360.79 kbit/s
------------------------+-------------+-------------+---------------
estimated 83.35 GiB | 29.14 GiB | 112.49 GiB |

And this is from the Traffic Totals GUI page:

Data Summary
Time WAN TX WAN RX WAN Ratio WAN Total
1 05/2020 285.95 MiB 889.25 MiB 0.32 1.15 GiB
2 04/2020 319.21 GiB 639.36 GiB 0.50 958.57 GiB
3 02/2020 235.33 GiB 538.28 GiB 0.44 773.61 GiB
4 01/2020 300.31 GiB 480.74 GiB 0.62 781.05 GiB
5 12/2019 317.94 GiB 664.14 GiB 0.48 982.08 GiB
6 11/2019 157.00 GiB 784.68 GiB 0.20 941.68 GiB
7 11/2019 102.15 GiB 698.91 GiB 0.15 801.06 GiB
8 10/2019 66.30 GiB 517.49 GiB 0.13 583.80 GiB
9 09/2019 75.41 GiB 321.16 GiB 0.23 396.56 GiB
10 08/2019 64.81 GiB 324.23 GiB 0.20 389.04 GiB
11 07/2019 73.53 GiB 885.38 GiB 0.08 958.91 GiB
12 06/2019 82.48 GiB 491.75 GiB 0.17 574.22 GiB
13 05/2019 190.81 GiB 549.92 GiB 0.35 740.72 GiB
14 04/2019 92.76 GiB 382.62 GiB 0.24 475.37 GiB

Also available in: Atom PDF