USB Performance and Traffic Monitor – Tools and Tips

monitoringperformanceusb

First of all, I found a similar question but it doesn't really solve my problem. I am trying to discover if the USB bus for a device I am using is the bottleneck in my program.

How can I monitor a USB bus (similar to how gnome-system-monitor works) to show bus utilization? Basically I want to identify when the bus is being 'maxed' out. I guess what I am looking for is some interface for usbmon, as that appears like it would do what I need.

This came about from testing the USRP and GNU Radio. I am running into a situation where it appears that the USB bus could be a limiting factor, so I ask the more general question of USB performance monitoring.

Best Answer

Since usbmon provides the length of each packet transferred, I would approach this by writing a quick program to parse the 0u file (which has data for all USB devices.) It would pick out the USB bus and device numbers, then keep a running total of the packet length field in both directions for each device.

This will then give you the amount of data transferred per device, in each direction. If you print it once a second you'll get a pretty good idea of each device's throughput. Note that it won't include any USB overhead, but if you compare the figures to a device that is able to saturate the available bandwidth you'll know whether you're getting close to the limit.

Related Question