cjbassi / ytop

A TUI system monitor written in Rust
MIT License
2.16k stars 84 forks source link

Ignore `bond` as well as `tun` for network activity #95

Open CosmicHorrorDev opened 4 years ago

CosmicHorrorDev commented 4 years ago

Addresses: #92

The network graph already had logic to ignore just tun0. However, having multiple tuns or in the case of #92 having a bond will still cause the problem of counting for the virtual and physical network device. This change just changes the logic to ignore all tunnels and bonds.

Just as a note for future work it would be nice to have a way of detecting and filtering out virtual devices instead of dealing with all of these cases separately, but it looks like rust-psutil doesn't have that functionality yet.