pcitui is a terminal-based user interface (TUI) utility for interactively browsing PCI devices on a Linux system. It provides a hierarchical view similar to lspci, but allows for easier navigation and quick access to device details.
(Consider adding a screenshot or animated GIF here showing the TUI in action)
- Interactive List: Scroll through all detected PCI devices.
- Hierarchical View: Multi-function devices are displayed in a tree structure.
- IOMMU Group Display: Shows IOMMU group numbers for devices (if available and IOMMU is enabled).
- Detailed Popup: Press Enter on a device (function) line to view detailed information, including:
- Vendor/Device ID and Name
- Revision ID
- Class and Subsystem
- Programming Interface (ProgIf)
- Interrupt Information (Pin/IRQ)
- Control and Status Registers
- Latency Timer / Cache Line Size
- PCI Capabilities List (basic names and IDs)
- Memory/IO Regions (BARs)
- Kernel Driver in Use (requires appropriate permissions, usually works without root)
- Scrollable Details: The details popup supports vertical and horizontal scrolling for devices with lots of information.
- Adaptive Layout: Main window and popup resize dynamically with the terminal.
- Scroll Indicators: Visual cues (▲▼◀▶↕↔) show when more content is available via scrolling.
- Refresh: Update the device list on demand.
To build pcitui, you need:
- A C compiler (like
gcc) makelibpcidevelopment library (e.g.,libpci-devon Debian/Ubuntu,pciutils-develon Fedora/CentOS)ncurseswdevelopment library (e.g.,libncursesw5-devon Debian/Ubuntu,ncurses-develon Fedora/CentOS)
- Clone the repository:
git clone <repository-url> cd pcitui
- Compile using make:
This will create the
make
pcituiexecutable in the current directory.
Simply run the compiled executable:
./pcituiKeybindings:
- Up/Down Arrows: Navigate the device list.
- Left/Right Arrows: Scroll the selected line horizontally if it's too wide.
- PageUp/PageDown: Scroll the device list by a full page.
- Enter: Show the detailed information popup for the selected device function.
- R: Refresh the device list (re-scans the PCI bus).
- Q: Quit the application.
Inside the Popup:
- Up/Down/Left/Right Arrows: Scroll the content vertically and horizontally.
- PageUp/PageDown: Scroll the content vertically by a full page.
- Enter / Q / Esc: Close the popup window.
This project is licensed under the MIT License - see the LICENSE file for details (or choose another license like GPL and update this section).
- Uses the
libpcilibrary for PCI device information. - Uses the
ncurseswlibrary for the terminal user interface.