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.

  • 1
    While wireshark and usbmon get the traffic, I need something that can more easily give me an idea of throughput and such. Commented Apr 5, 2011 at 14:38
  • Do you see the usb bus reaching its theoretical maximum? Did you compare the traffic you get with benchmarks of your hardware? Max throughput is usually depended on the device connected and not the system bus, so to test it properly you'll need some hardware specifically made for that purpose.
    – forcefsck
    Commented Apr 13, 2011 at 17:21

6 Answers 6


Use usbtop, it gives a nice overview of what devices are using how much bandwidth:

Bus ID 1 (USB bus number 1) To device   From device
  Device ID 1 :             0.00 kb/s   0.00 kb/s
  Device ID 2 :             0.00 kb/s   0.00 kb/s
Bus ID 2 (USB bus number 2) To device   From device
  Device ID 1 :             0.00 kb/s   0.00 kb/s
  Device ID 4 :             141.73 kb/s 13777.68 kb/s
  Device ID 5 :             9.98 kb/s   11.24 kb/s
  Device ID 6 :             0.00 kb/s   0.00 kb/s
  Device ID 7 :             0.00 kb/s   0.00 kb/s
  Device ID 8 :             141.71 kb/s 15257.26 kb/s
  • 2
    Thanks for pointing me to usbtop. It looks useful. Here's how to install it: unix.stackexchange.com/a/489268/114401. Commented Dec 16, 2018 at 7:46
  • 1
    On Ubuntu 19.04 it is in the official repositories, i.e. simply apt install usbtop.
    – luator
    Commented Oct 29, 2019 at 10:14
  • 1
    As recalled in other posts, usbtop needs the usbmon kernel module to be loaded. For instance with sudo modprobe usbmon
    – azmeuk
    Commented Jul 2, 2023 at 16:06

1. usbtop:

As sebas points out, usbtop seems to give a certain minimum level of useful information (although it could be much better), so I recommend it.

enter image description here

Here's how to install it (build usbtop from source code):

  1. Clone the git repo:
    git clone https://github.com/aguinet/usbtop.git 
  2. Navigate to the directory that just got created from git clone:
    cd usbtop
  3. Install dependencies:
    sudo apt update 
    sudo apt install \
        libboost-dev \
        libpcap-dev \
        libboost-thread-dev \
        libboost-system-dev \
        cmake \
  4. Create local build directory & cd into it:
    mkdir _build && cd _build 
  5. Run cmake to prepare to build usbtop from source:
    cmake -DCMAKE_BUILD_TYPE=Release .. 
  6. Build usbtop from source:
  7. Install usbtop:
    sudo make install 
  8. Load the usbmon kernel module to open access to USB buses (I think this is what that does, but I know it's required):
    sudo modprobe usbmon 
  9. Run usbtop (if this doesn't work, use sudo usbtop instead):

If I missed anything let me know in the comments.

Install References:

2. Update: You can also use iostat instead:

sudo apt install sysstat

Run at 1-second intervals with:

iostat -d 1

OR with 0.1-second intervals with:

watch -n 0.1 iostat

Sample output of iostat -d 1:

enter image description here



Additional reading:



  • For the first solution, you missed a dependency: sudo apt install cmake
    – Ferrybig
    Commented Apr 17, 2020 at 10:11
  • Thanks. I just added it! Commented Apr 24, 2020 at 9:14
  • the second solution shows gibberish results toolbox.com/collaboration/team-collaboration/question/… Commented Jul 5, 2021 at 15:04
  • iostat would be so much better if it just kept a sum of the amount copied, and rewrite over the previous value, instead of creating additional lines!
    – Rodrigo
    Commented Nov 16, 2021 at 3:20
  • 1
    Note if the cmake is failing you might need to sudo apt install build-essential
    – Jose Rocha
    Commented Aug 5, 2022 at 8:49

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.

  • 3
    I was hoping for a pre-existing tool, but I suppose this will be sufficient. Commented Apr 18, 2011 at 22:12

I've wrote a pair of shell scripts to get the throughput from a USB device. If someone what to use it, you can find it in this post.


Using htop, I pressed F2 for Setup, selected columns, added IO_READ_RATE, IO_WRITE_RATE or IO_RATE, and i was able to see the speed at which processes were reading or writing from and to disks.

  • This question is about USB traffic though, not disk traffic (e.g. how much bandwidth a USB webcam uses.)
    – Malvineous
    Commented Dec 9, 2019 at 2:36

For the wireshark option:

  1. Make sure usbmon is running
    sudo modprobe usbmon
  2. Run wireshark
    sudo wireshark # may or may not requiring sudoing
  3. Identify the correct USB interface (usbmonX) and start the capture
  4. In the top menu, Statistics --> I/O Graph
  5. Filter the display for the USB packets (or just leave empty to measure all USB packets)
  6. Set Y Axis to Bytes

You can compare the bytes/s with the max speed of USB2.0 or USB3.0 depending on your USB interface.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .