Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total Network Usage Reported [Boot RX] is not Correct #377

Open
2 tasks done
abuturabofficial opened this issue Sep 21, 2023 · 7 comments
Open
2 tasks done

Total Network Usage Reported [Boot RX] is not Correct #377

abuturabofficial opened this issue Sep 21, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@abuturabofficial
Copy link

abuturabofficial commented Sep 21, 2023

Has this issue been covered in the Wiki?

  • I have read the Wiki and my issue is not covered.

Is there an existing issue reported already?

  • I have searched the existing issues, it does not exist.

What is the unexpected behavior?

The total network usage shows very high amount like scores of GBs, while the actual usage is not that high.
And this is not a Bits/Bytes difference either as I have checked, but still total network usage number didn't make sense.

Steps to reproduce the unexpected behavior.

  1. Click on the network sensor
  2. Check Boot rx value total number of GBs consumed during the device boot up on the network.

Relevant log output

No response

What distribution and version of Linux are you using?

Fedora 38

What version of Gnome are you using?

44.4

@abuturabofficial abuturabofficial added the bug Something isn't working label Sep 21, 2023
@corecoding
Copy link
Owner

What are you comparing Vitals to?

@abuturabofficial
Copy link
Author

abuturabofficial commented Sep 24, 2023

What are you comparing Vitals to?

To the data plan I have.

Edit: Also the high network usage it reports even for short time of usage (I'm considering all the other factors too) is totally absurd. I was suspecting it for quite some time, and then recently, I compared it to my data usage on the plan I have, it's the difference of more than >200%.

As I use mobile hotspot for Data, so it's a quite useful feature for me if it had worked as intended to track my usage.

@corecoding
Copy link
Owner

Boot rx is the SUM of all interfaces in /sys/class/net. In each interface directory, there is a file called statistics/rx_bytes. Excluding the lo directory, if the sum of all of your rx_bytes is different than Boot rx, please let me know. Do include screenshots. If the sum of these rx_bytes files (again excluding lo) are the same as Boot rx, then your problem is not Vitals.

@corecoding
Copy link
Owner

for i in /sys/class/net/*; do echo -n "$i: "; cat $i/statistics/rx_bytes; done

If you can share the output of that along with the screenshot from Vitals (at the same moment) it would be helpful.

@abuturabofficial
Copy link
Author

abuturabofficial commented Oct 1, 2023

It's morning here, so I just booted up. I hope this will help. My mobile hotspot showing >300 MB of usage which matches to the wlp61s0 from the command you shared, but not to what reported on vitals

Edit: Sorry, didn't see your other comment. It does come up to the vitals reported numbers. But combining all the interfaces doesn't make sense? As in my case, the wlp61s0 is my Wi-Fi (hotspot), and wg0 is my WireGuard VPN. Counting them both for the Total network usage is what it supposes to do? As both are reporting the same thing with a bit of variable inaccuracy.

2023-10-01_07-05
Screenshot from 2023-10-01 07-05-21

@corecoding
Copy link
Owner

The wg0 interface should be excluded from Boot RX. Would you mind looking inside each of the in the wg0/ and wlp61s0/ directories, (including statistics/ directories) to see if there is a file that would signify this is a VPN? That way I can ignore all VPNs opposed to just wg0.

@abuturabofficial
Copy link
Author

There is a /sys/class/net/<interface>/uevent file that describes the interface. For my wg0 VPN config, it reads:

DEVTYPE=wireguard
INTERFACE=wlp61s0
IFINDEX=3

I think (I'm no expert at all), the other valid possible solution is to include only what's expected on the network like enp0s31f6 or wlp61s0 interfaces, as for WireGuard there could be any name of the interface given by the user (though uevent file will still be able to list it as WireGuard).

I have tested it with OpenVPN config file, and the interface for it called tun0 independent of what I have chosen a name for my OVPN. The uevent file reads:

INTERFACE=tun0
IFINDEX=5

For wlp61s0 interface, the uevent file reads:

DEVTYPE=wlan
INTERFACE=wlp61s0
IFINDEX=3

As you can see, uevent file shows consistency in naming all other interfaces (including enp0s31f6), but for OpenVPN it breaks that naming convention of DEVTYPE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants