Skip to content

ccebelenski/pcitui

Repository files navigation

pcitui - A Simple Terminal UI for Browsing PCI Devices

License: MIT

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)

Features

  • 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.

Dependencies

To build pcitui, you need:

  • A C compiler (like gcc)
  • make
  • libpci development library (e.g., libpci-dev on Debian/Ubuntu, pciutils-devel on Fedora/CentOS)
  • ncursesw development library (e.g., libncursesw5-dev on Debian/Ubuntu, ncurses-devel on Fedora/CentOS)

Building

  1. Clone the repository:
    git clone <repository-url>
    cd pcitui
  2. Compile using make:
    make
    This will create the pcitui executable in the current directory.

Usage

Simply run the compiled executable:

./pcitui

Keybindings:

  • 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.

License

This project is licensed under the MIT License - see the LICENSE file for details (or choose another license like GPL and update this section).

Acknowledgements

  • Uses the libpci library for PCI device information.
  • Uses the ncursesw library for the terminal user interface.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors