diff --git a/ls-iommu.sh b/ls-iommu.sh new file mode 100755 index 0000000..326de2a --- /dev/null +++ b/ls-iommu.sh @@ -0,0 +1,6 @@ +#!/bin/bash +for d in /sys/kernel/iommu_groups/*/devices/*; do + n=${d#*/iommu_groups/*}; n=${n%%/*} + printf '%s ' "$n" + lspci -nns "${d##*/}" +done diff --git a/utilities/utilities.plugin.zsh b/utilities/utilities.plugin.zsh index 9b7f254..3a13aaf 100644 --- a/utilities/utilities.plugin.zsh +++ b/utilities/utilities.plugin.zsh @@ -102,3 +102,7 @@ if which docker-machine &> /dev/null; then fi } fi + +ls-iommu() { + $HOME/.config/zsh/ls-iommu.sh | sort -n +}