dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
scripts/pci.sh (337B)
1#! /usr/bin/env nix
2#! nix shell nixpkgs#bash nixpkgs#coreutils -c bash
3
4# Shows PCI Devices mapped to IOMMU Groups #
5
6for group in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V)
7do
8 echo "IOMMU Group ""${group##*/}"":"
9 for device in "$group"/devices/*
10 do
11 echo -e "\t$(lspci -nns "${device##*/}")"
12 done
13done