Monitoring USB bandwidth - Jetson Orin Nano

Hello -
I am trying to monitor the usb bandwidth of a webcam on a Jetson Orin Nano Jetpack 6.0. Usually I would use “usbtop” but when trying to install, I see that usbmon is not set in the kernel configs.

$ sudo modprobe usbmon

modprobe: FATAL: Module usbmon not found in directory /lib/modules/5.15.136-tegra

and

$ grep CONFIG_USB_MON /usr/src/linux-headers-5.15.136-tegra-ubuntu22.04_aarch64/3rdparty/canonical/linux-jammy/kernel-source/.config

# CONFIG_USB_MON is not set

What is the process of rebuilding the kernel with CONFIG_USB_MON=y? Will this fix the usbmon issue?

Are there alternatives to usbmon / usbtop for monitoring the active usb bandwidth of (i.e.) a webcam?

Hi,
Please refer to developer guide to manually enable certain configs and build kernel image:

Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation

We don’t have much experience in monitoring USB bandwidth in runtime. You may enable the config and try. Or may see if other users can share experience.

I will add that the least painful approach is to get your kernel source for your L4T release (see “head -n 1 /etc/nv_tegra_release”), then go there to get the kernel source:
https://developer.nvidia.com/linux-tegra

Match the configuration of that source to your running Jetson, including CONFIG_LOCALVERSION (which would be “-tegra”), and then add CONFIG_USB_MON as a module using a dependency aware tool (such as menuconfig or nconfig). Build the module, copy the module in place, and you are done.

If you use “CONFIG_USB_MON=y”, *then you must copy the whole kernel and all newly compiled modules in place.