• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

setpci command – configure PCI device

by admin

There are lots of different I/O ports in use on the Linux system at any time, so your output will most likely differ from this example. With PnP, I/O port conflicts aren’t very common, but it is possible that two devices are assigned the same I/O port. In that case, you can manually override the settings automatically assigned by using the setpci command.

The setpci command is a utility to query and configure PCI devices. The numbers used in the command are all hexadecimal numbers. Because the setpci command needs to modify the configuration parameters of the hardware, it must have the “root” user authority. Before using the setpci command to configure PCI devices, in order to prevent problems with the operating system, always use the “setpci -vD” command to view the operation process of the setpci command.

Syntax:

setpci [parameter] [PCI device/operation]

Command parameters:

  • -v: Display detailed information about the execution of instructions
  • -f: When there is no operation to complete, no information is displayed
  • -D: Test mode, does not actually write configuration information to the register.
  • -d: Only display information for a given manufacturer and device.
  • -s: Only display the information of the device on the specified bus, slot, or function block on the device.

Examples of setpci Command

1. Is the device 0: 14.0 device, the PCI configuration space is cheap to 0x60, write a new byte variable 6:

# setpci -s 0:14.0 60.B=6

2. Set the timer of the PCI device:

# setpci -d : latency_time=40

3. List PCI devices and adjust them:

# lspci
00:0f.0 VGA compatible controller: VMware SVGA II Adapter

# setpci -s 00:0f.0 F4.B=FF
# setpci -s 00:0f.0 F4.B=CC

Conclusion

You can use the setpci utility to directly query and adjust PCI devices’ configurations. This tool is most likely to be useful if you know enough about the hardware to fine-tune its low-level configuration; it’s not often used to tweak the hardware’s basic IRQ, I/O port, or DMA options.

Filed Under: Linux

Some more articles you might also be interested in …

  1. Understanding chroot Jail
  2. SSH Login Stuck At : “debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP” CentOS/RHEL 7
  3. qm create Command Examples in Linux
  4. CentOS / RHEL 7 : systemd-analyze command to find booting time delays
  5. CentOS / RHEL : How To Check FC Brocade HBA Firmware
  6. CentOS / RHEL : How to create a Thinly Provisioned Logical Volume
  7. How to delete a partition using fdisk
  8. lastlog: command not found
  9. grub-mkconfig Command Examples in Linux
  10. dnsrecon: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright