$ show lseurttyuu/GPU-T
GPU-T is a Linux desktop utility for comprehensive GPU information and monitoring, positioned as a GPU-Z alternative for Linux. It provides real-time sensor data (clocks, temperatures, power, fan speeds), static hardware specifications from JSON databases and sysfs, and detection of API capabilities (Vulkan, OpenCL, CUDA, etc.) through a modular probe system. The application follows the MVVM pattern with Avalonia UI and features a sidecar process for NVIDIA-specific NVAPI/NVML interactions to ensure stability and isolate native interop. Hardware detection relies on sysfs paths, external tool execution, and vendor-specific databases, with user override capabilities for hardware specifications. The modular design separates concerns into probes for hardware polling, advanced providers for feature detection, and utilities for common tasks like settings management and shell command execution.
The LLM identified 4 files worth highlighting for reuse:
Implements the factory pattern to create vendor-specific GPU probe instances (AMD, NVIDIA, Intel, generic) based on detected hardware. Decouples the UI and application logic from vendor-specific implementation details, allowing for easy extension to new GPU vendors.
Provides a common base class for all advanced data providers (Vulkan, OpenCL, CUDA, etc.) with shared functionality including sysfs helpers, byte size formatting, and a standardized structure for exposing key-value data. Reduces code duplication and enforces a consistent API across different hardware feature detectors.
Manages the lifecycle of vendor-specific JSON hardware databases (AMD, NVIDIA, Intel) including loading, merging, and applying user overrides. Encapsulates data access logic and provides a clean interface for the rest of the application to query GPU specifications without knowing the underlying storage format.
A robust wrapper for executing shell commands with support for timeout, output capture, and proper error handling. Centralizes the invocation of external system tools (like vulkaninfo, lspci, etc.) and isolates the application from the complexities of direct process management, making it reusable in any .NET application needing to interact with the shell.