Created
March 10, 2017 23:59
-
-
Save flungo/428c374c040de1d0a30fd4a593d39040 to your computer and use it in GitHub Desktop.
List the devices and their IOMMU groups.
This file contains 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
#!/bin/bash | |
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); 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
For a bit nicer looking output: https://gist.github.com/r15ch13/ba2d738985fce8990a4e9f32d07c6ada 😄