-
-
Notifications
You must be signed in to change notification settings - Fork 653
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
network: bandwidth speed is wrong, shows as sum over all interfaces #610
Comments
Relevant code is in src/modules/network.cpp I'll try to look into it if I can (I'm not familiar with C++). |
yeah, It's even adding the speed of localhost ( playing local videos on browser using jellyfin ) |
Not sure if it's related but for me the reported speed is too low (~6% with VPN, ~3% without). |
I spent some time trying to make the changes to read from /proc/net/dev, but I'm not super comfortable with c++ and struggled to incorporate these changes into the project as it is. In case it's helpful for the next person that tries to tackle this, here's a standalone program that prints the total bandwidth used for the specified interface https://gist.github.com/ciarand/568e6e8d99aa2f1ba0d489ecba9b0d68 Feel free to steal/copy this code if it's helpful (or ignore it if it's not) |
This fixes issue Alexays#610 by reading bandwidth usage per-interface from /proc/net/dev instead of globally via /proc/net/netstat. It supports the same matching logic as elsewhere, so setting interface to '*' should display the same sum-total bandwidth usage as the previous implementation.
This fixes issue Alexays#610 by reading bandwidth usage per-interface from /proc/net/dev instead of globally via /proc/net/netstat. It supports the same matching logic as elsewhere, so setting interface to '*' should display the same sum-total bandwidth usage as the previous implementation.
Sent out #1230 that attempts to fix this |
Looks fixed to me, thanks @ciarand ! |
Currently placeholders like
{bandwidthDownBits}
show the sum across all interfaces, this is a problem if you use a VPN and so all your traffic goes through tunnel interface and then a wireless interface, the numbers shown by waybar are doubled comparing to real internet speed.I would like to ask that all these placeholders show information about the currently shown interface name.
I tried to enforce the interface name via config
"interface": "wlan0"
but this doesn't affect these placeholders.The text was updated successfully, but these errors were encountered: