Bandwhich is a “Terminal bandwidth utilization tool”. It’s a useful utility to determine what applications/processes are consuming network resources. They’re currently trying to reboot the project and gather more contributors. I’d like to get this package published in the snap store, so we can help draw attention to the project. In addition, there’s no package or documentation available for Ubuntu users.
Without network-control, the application fails to function:
$ sudo bandwhich
Error:
lo, enp5s0, zt44xdmaty, lxdbr0:
Insufficient permissions to listen on network interface(s). You can work around
this issue like this:
* Try running `bandwhich` with `sudo`
* Build a `setcap(8)` wrapper for `bandwhich` with the following rules:
`cap_sys_ptrace,cap_dac_read_search,cap_net_raw,cap_net_admin+ep`
$ echo $?
2
I originally hoped that maybe you could get away with network-observe here, but it doesn’t provide cap_net_admin so won’t do the trick. Looks like network-control will be required. +1 from me.
While I’m sure the majority of users of the snap will know what it’s capabilities are, might I suggest that the snap description include a note that the snap can view all traffic from all users on the host (a little redundant seeing as it needs to be run as root, but perhaps worth calling out regardless).