From Fedora Project Wiki

< Kernel

Revision as of 22:47, 7 March 2016 by Labbott (talk | contribs) (Created page with "usbmon is a mechanism for catching information on the USB bus. This is useful for debugging some kinds of USB problems. The existing [http://lxr.free-electrons.com/source/Docu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

usbmon is a mechanism for catching information on the USB bus. This is useful for debugging some kinds of USB problems. The existing usbmon documentation is very good. A rehash of the documentation is below.

First, identify which bus number of the device you want to trace. You can find this via lsusb. e.g.

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

gives bus number 2. Then do

# modprobe usbmon

This starts the usbmon tracing. To start capturing output do

# cat /sys/kernel/debug/usb/usbmon/2u > /tmp/usbmon_out

replacing 2u with your bus number (i.e. Bus003 -> 3u, Bus008 -> 8u).

This will continue to write to the file until it is terminated. The capture steps now look like

- start capturing the usbmon output to a file - Run your tests with the USB device - stop capturing the usbmon output