summaryrefslogtreecommitdiff
path: root/hosts/iroha/scripts/iommu-groups
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-11-12 22:26:02 -0500
committerAndrew Opalach <andrew@akon.city> 2024-11-12 22:36:49 -0500
commit53a0a5473f45d37027af9663638adbf56667e4ca (patch)
tree05c6c39678a9005f95c00e0fdf31193657bd4d3d /hosts/iroha/scripts/iommu-groups
downloaddotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.gz
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.bz2
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.zip
Hopefully no leaks
Diffstat (limited to 'hosts/iroha/scripts/iommu-groups')
-rwxr-xr-xhosts/iroha/scripts/iommu-groups6
1 files changed, 6 insertions, 0 deletions
diff --git a/hosts/iroha/scripts/iommu-groups b/hosts/iroha/scripts/iommu-groups
new file mode 100755
index 0000000..217d1e2
--- /dev/null
+++ b/hosts/iroha/scripts/iommu-groups
@@ -0,0 +1,6 @@
+#! /usr/bin/env bash
+for d in /sys/kernel/iommu_groups/*/devices/*; do
+ n=${d#*/iommu_groups/*}; n=${n%%/*}
+ printf 'IOMMU Group %s ' "$n"
+ lspci -nns "${d##*/}"
+done