Skip to content

Instantly share code, notes, and snippets.

@agrathwohl
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save agrathwohl/14076a519647ba5ece37 to your computer and use it in GitHub Desktop.

Select an option

Save agrathwohl/14076a519647ba5ece37 to your computer and use it in GitHub Desktop.
Get all PCI slots and their availability status via the terminal
sudo dmidecode -t 9 | grep -E "DMI type"\|Usage\|Type
@agrathwohl
Copy link
Author

Example output:

agrathwohl@Flybox:~/Downloads$ sudo dmidecode -t 9 | grep -E "DMI type"\|Usage\|Type

Handle 0x0008, DMI type 9, 17 bytes
    Type: x16 PCI Express
    Current Usage: Available
Handle 0x0009, DMI type 9, 17 bytes
    Type: x1 PCI Express
    Current Usage: Available
Handle 0x000A, DMI type 9, 17 bytes
    Type: x16 PCI Express
    Current Usage: In Use
Handle 0x000B, DMI type 9, 17 bytes
    Type: x8 PCI Express
    Current Usage: Available
Handle 0x000C, DMI type 9, 17 bytes
    Type: 32-bit PCI
    Current Usage: In Use
Handle 0x000D, DMI type 9, 17 bytes
    Type: 32-bit PCI
    Current Usage: Available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment