bandwhich icon indicating copy to clipboard operation
bandwhich copied to clipboard

Display the monitored interface and (if available) name [enhancement]

Open squatto opened this issue 5 years ago • 9 comments

It would be helpful if the UI showed the interface that's being monitored, and if possible, the name. This is especially useful when monitoring multiple interfaces at the same time.

e.g. on macOS I have these:

❯ networksetup -listallhardwareports

Hardware Port: Wi-Fi
Device: en0

Hardware Port: USB 10/100/1000 LAN
Device: en7

Maybe add it before the "Total Rate Up/Down" on the first line?

image

I would think that it would be preferred to be shown by default and not displayed through a command line switch.

If I had any experience with Rust I'd give it a go myself, but I unfortunately don't. I suspect that with the cross-platform nature of what it would require platform-specific processes to retrieve the interface name. However, given that the monitored interface (e.g. en0) is known, that could be displayed fairly easily?

Thanks!

squatto avatar Dec 30 '19 17:12 squatto

I like the idea! We already show the interface name in the UI for each connection string, so we could definitely show either a specific interface near the "Total Rate" above (if using the -i flag), or "All Interfaces" (or some such) if not using -i.

imsnif avatar Dec 30 '19 17:12 imsnif

@imsnif Excellent! I installed a Rust IDE and I'll see if this is something that I can tackle when I have a chance. Do you have a good Rust resource or two you can recommend?

squatto avatar Dec 30 '19 19:12 squatto

I really liked The Book. Beware though, it can be a little overwhelming at times. :)

This part of the project is (mostly) well covered in tests, so cargo test can help you out - and the rust compiler is pretty amazing with its detailed error messages. So if you want to just dive in and hack a little after you get the basic syntax (and likely a primer on the borrow checker!) you might find some success there. Feel free to ping me with any questions, issues, or if you need a direction or ideas.

imsnif avatar Dec 30 '19 20:12 imsnif

If somebody is interested to finish this PR, feel free to pick it up, because I have an issues with testing framework on my local machine

captain-yossarian avatar Mar 03 '20 18:03 captain-yossarian

Hi, @imsnif . Is this issue still relevant ? I'm happy to continue my work

captain-yossarian avatar Aug 20 '20 19:08 captain-yossarian

Sure @captain-yossarian, that would be great :)

imsnif avatar Aug 21 '20 07:08 imsnif

@imsnif is this still being worked on or relevant? Seems #112 was closed by mistake. @captain-yossarian I am happy to take this on if you are not working on it?

bjohnnyd avatar May 03 '22 09:05 bjohnnyd

@bjohnnyd sure, go for it. I came back to Ukraine, so I defenitely have no time

captain-yossarian avatar May 03 '22 09:05 captain-yossarian

Hey @bjohnnyd - it is unlikely that I'll find time to review such a PR in the near future. The project has incurred some technical debt in the form of its CI and I would have to take care of that one first. I just don't want you to waste your time.

Stay safe @captain-yossarian !!

imsnif avatar May 03 '22 11:05 imsnif

...i guess this could be closed now. #340

alicektx avatar Feb 10 '24 12:02 alicektx