Skip to content

Instantly share code, notes, and snippets.

@kyokenn
Created April 27, 2018 09:42
Show Gist options
  • Select an option

  • Save kyokenn/58ce489cd1486e79dbaf2d01f46fd511 to your computer and use it in GitHub Desktop.

Select an option

Save kyokenn/58ce489cd1486e79dbaf2d01f46fd511 to your computer and use it in GitHub Desktop.
#!/bin/bash
for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do
echo -e "\033[1m[IOMMU group $(basename "$iommu_group")]\033[0m";
for device in $(ls -1 "$iommu_group"/devices/); do
echo -n $'\t';
lspci -nns "$device";
done;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment