Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Handle network bonding #92

Open
Frederick888 opened this issue Jun 29, 2020 · 1 comment
Open

Handle network bonding #92

Frederick888 opened this issue Jun 29, 2020 · 1 comment

Comments

@Frederick888
Copy link

My machine has got two NICs and I've configured network bonding using balance-alb via systemd.

This causes ytop to show incorrect network usage as I guess it adds up all traffics through the physical NICs as well as the virtual bond NIC.

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:1e:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: enp3s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq master bond0 state UP mode DEFAULT group default qlen 1000
    link/ether 00:1e:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff permaddr 00:1e:xx:xx:xx:xx
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:1e:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

$ networkctl list
IDX LINK   TYPE     OPERATIONAL SETUP
  1 lo     loopback carrier     unmanaged
  2 enp2s0 ether    enslaved    configured
  3 enp3s0 ether    enslaved    configured
  4 bond0  bond     routable    configured

4 links listed.
@CosmicHorrorDev
Copy link

You're exactly right, the current implementation will count both the bond as well as the physical devices. I made a pull request to address this #95.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants