This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://chatgpt.com/c/6828dc89-e524-800e-b978-05b3f27626c9 | |
# IOMMU and Device Enumeration Script | |
# Description: Enumerates IOMMU groups and lists associated PCI and USB devices | |
# in a neatly formatted, column-aligned table. | |
# Usage: Run as root or with permissions to read /sys/kernel/iommu_groups, | |
# and have lspci and lsusb available. | |
# Output: Columns: IOMMU group, Device ID (vendor:device), Flags (e.g., reset support or USB), | |
# Address or bus:device, Type (PCI/USB), Description. |