aguinet / usbtop

usbtop is a top-like utility that shows an estimated instantaneous bandwidth on USB buses and devices.
BSD 3-Clause "New" or "Revised" License
277 stars 45 forks source link

No output when ran without proper permission #3

Closed slokhorst closed 7 years ago

slokhorst commented 7 years ago

When I run usbtop as regular user, the following message flashes by:

Error while capturing traffic from usbmon1: usbmon1: Can't open USB bus file /sys/kernel/debug/usb/usbmon/1t: Permission denied

But it disappears in a fraction of a second, and it is unclear what the problem is. Is there a way to show this error longer, or print a custom error message, hinting what the problem is?

(By the way, this program is exactly what I was looking for! It seems to be the only simple way to read out USB bandwidth.. I'm quite surprised that it isn't well known yet!)

aguinet commented 7 years ago

Hello,

I just pushed a commit that makes usbtop exit if it couldn't have successfully open any USB bus. These error(s) can happen if you don't have loaded the usbmon kernel module (sudo modprobe usbmon) and/or if you don't run this software as root.

As a side note, that's cool if this software helps you :)

aguinet commented 7 years ago

Please let me know if this fixes your issues!

slokhorst commented 7 years ago

Perfect! Thank you for the quick fix!