Lspci For Mac


lspci stands for list pci. Think of this command as “ls” + “pci”.

@tjt263, right, there are both macOS ports of pciutils and libusb (I suspect that lspci and lsusb are included in the respective source trees as examples/handy utils). There are also wrapper shells available that use e.g. Systemprofiler SPUSBDataType as a datasource and try to behave like lsusb or whatever. – kervich Mar 13 '17 at 14:33. NAME lspci - list all PCI devices SYNOPSIS lspci options DESCRIPTION lspci is a utility for displaying information about PCI buses in the system and devices connected to them. By default, it shows a brief list of devices. Use the options described below to request either a more verbose output or output intended for parsing by other programs. This is our 4th post on finding hardware details in Linux. Till this point we explored different ways to display complete hardware available in a system. We already explored following posts. Get BIOS, Firmware, Hardware And Drivers Details in Linux/Unix What is dmesg command and how to use it in Linux/Unix? Find hardware info with. MacSpice 3 by Charles D. Williams Introduction. MacSpice simulates and analyses electronic circuits that can range in complexity from a single resistor to an.

This will display information about all the PCI bus in your server.

Apart from displaying information about the bus, it will also display information about all the hardware devices that are connected to your PCI and PCIe bus.

For example, it will display information about Ethernet cards, RAID controllers, Video cards, etc.
lspci utility is part of the pciutils package.

If you don’t have pciutilis, install it on your system as shown below.

1. Default Usage

By default it will display all the device information as shown below. The first field is the slot information in this format: [domain:]bus:device.function

In this example, since all the domain are 0, lspci will not display the domain.

Note: In all the examples below, we’ll be showing only partial output by picking couple of devices from the above list.

2. Dump PCI Info in Different Format

If you want to pass the output of the lspci command to a shell script, you may want to use -m option (or -mm option) as shown below.

This option is also helpful when you want to view the subsystem information. For example, for the RAID controller, the default output just says that is is using LSI Logic RAID controller. But, the following output displays the subsystem, which is DELL PERC H700 Integrated RAID controller system.

3. Output in Tree Format

The -t option will display the output in tree format with information about bus, and how devices are connected to those buses as shown below. The output will be only using the numerical ids.

4. Detailed Device Information

If you want to look into details of a particular device, use -v to get more information. This will display information about all the devices. The output of this command will be very long, and you need to scroll down and view the appropriate section.

For additional level for verbosity, you can use -vv or -vvv.

In the following example, I’ve given output of only the RAID controller device.

5. Display Device Codes in the Output

If you want to display the PCI vendor code, and the device code only as the numbers, use -n option. This will not lookup the PCI file to get the corresponding values for the numbers.

If you want to display both the description and the number, use the option -nn as shown below.

6. Lookup a Specific Device

When you know the slot number in the domain:bus:slot.func format, you can query for a particular device as shown below. In the following example, we didn’t specify the domain number, as it is 0, which can be left out.

When you know the device number in the vendor:device format, you can query for a particular device as shown below.

If you know only either the vendor id, or the device id, you can omit the other id. For example, both the following command will return the same output as the above.

7. Display Kernel Drivers

This is very helpful when you like to know the name of the kernel module that will be handling the operations of a particular device. Please note that this option will work only on Kernel 2.6 version and above.

> Add your comment

If you enjoyed this article, you might also like..

Next post: What is Cloud Computing? Introduction to Cloud Service Models

Previous post: How to Combine Ping and Traceroute On Linux Using MTR Command Examples


setpci - configure PCI devices


setpci [options] devices operations...


setpci is a utility for querying and configuring PCI devices.

All numbers are entered in hexadecimal notation.

Root privileges are necessary for almost all operations, excluding reads of the standard header of the configuration space on some operating systems. Pleasesee lspci(8) for details on access rights.


General options


Tells setpci to be verbose and display detailed information about configuration space accesses.



Tells setpci not to complain when there's nothing to do (when no devices are selected). This option is intended for use in widely-distributedconfiguration scripts where it's uncertain whether the device in question is present in the machine or not.


'Demo mode' -- don't write anything to the configuration registers. It's useful to try setpci -vD to verify that your complex sequence ofsetpci operations does what you think it should do.

Show setpci version. This option should be used stand-alone.

Lspci Mac Download

Show detailed help on available options. This option should be used stand-alone.

Show a list of all known PCI registers and capabilities. This option should be used stand-alone.

PCI access options

The PCI utilities use the PCI library to talk to PCI devices (see pcilib(7) for details). You can use the following options to influence itsbehavior:
-A <method>
The library supports a variety of methods to access the PCI hardware. By default, it uses the first access method available, but you can use this option tooverride this decision. See -A help for a list of available methods and their descriptions.

Lspci For Mac Catalina

-O <param>=<value>
The behavior of the library is controlled by several named parameters. This option allows to set the value of any of the parameters. Use -O help fora list of known parameters and their default values.

Use direct hardware access via Intel configuration mechanism 1. (This is a shorthand for -A intel-conf1.)


Use direct hardware access via Intel configuration mechanism 2. (This is a shorthand for -A intel-conf2.)


Increase debug level of the library.

Device Selection

Before each sequence of operations you need to select which devices you wish that operation to affect.

-d [<vendor>]:[<device>]
Select devices with specified vendor and device ID. Both ID's are given in hexadecimal and may be omitted or given as '*', both meaning 'any value'.
When -s and -d are combined, only devices that match both criteria are selected. When multiple options of the same kind are specified, therightmost one overrides the others.


There are two kinds of operations: reads and writes. To read a register, just specify its name. Writes have the formname=value,value... where each value is either a hexadecimal number or an expression of type data:mask where bothdata and mask are hexadecimal numbers. In the latter case, only the bits corresponding to binary ones in the mask are changed(technically, this is a read-modify-write operation).

There are several ways how to identity a register:

• Tell its address in hexadecimal.

• Spell its name. Setpci knows the names of all registers in the standard configuration headers. Use 'setpci --dumpregs' to get the complete list. SeePCI bus specifications for the precise meaning of these registers or consult header.h or /usr/include/pci/pci.h for a brief sketch.

• If the register is a part of a PCI capability, you can specify the name of the capability to get the address of its first register. See the names startingwith 'CAP_' or 'ECAP_' in the --dumpregs output.

• If the name of the capability is not known to setpci, you can refer to it by its number in the form CAPid or ECAPid, where id isthe numeric identifier of the capability in hexadecimal.


• Each of the previous formats can be followed by +offset to add an offset (a hex number) to the address. This feature can be useful for addressing ofregisters living within a capability, or to modify parts of standard registers.

• Finally, you should append a width specifier .B, .W, or .L to choose how many bytes (1, 2, or 4) should be transferred. The width canbe omitted if you are referring to a register by its name and the width of the register is well known.

All names of registers and width specifiers are case-insensitive.


Lspci For Mac Installer


asks for the word-sized command register.

is a numeric address of the same register.

asks for a 32-bit word starting at the location of the command register, i.e., the command and status registers together.

Lspci For Mac Os

specifies the upper byte of the vendor ID register (remember, PCI is little-endian).
corresponds to the second word of the power management capability.
asks for the first 32-bit word of the extended capability with ID 0x108.

See Also


lspci(8), pcilib(7)


The PCI Utilities are maintained by Martin Mares <[email protected]>.

Referenced By