Skip to content

Instantly share code, notes, and snippets.

@hyperparabolic
Created September 25, 2018 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyperparabolic/b7b4f1c9e87a1a5a8f552d2f33da17bc to your computer and use it in GitHub Desktop.
Save hyperparabolic/b7b4f1c9e87a1a5a8f552d2f33da17bc to your computer and use it in GitHub Desktop.
#!/bin/bash
shopt -s nullglob
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment