How xiao-yux/gpu_tool works
GPU Tool is a Linux server-delivery diagnostics and test application with a separate Flask/WebSocket interface for remote viewing and control. The CLI workflow starts in main.py, loads core/menu behavior, presents system or GPU test choices, runs commands through terminal sessions, and records diagnostic and run output. The Web interface exposes task, scanner, and client information operations backed by routes, persistent records, and WebSocket clients. The README documents GPU burn, fieldiag, NCCL, and result collection; sampled excerpts clarify only parts of their wiring, so uncertain links are omitted.
Main entry points: menu.py Interactive menus · routws.py HTTP routes · screen.py Command sessions · logger.py Log output
Components 23
CLI workflow
- CLI entry
src/gpu_tool/main.py - Core loader
src/gpu_tool/core/core.py - Interactive menus
src/gpu_tool/menu/menu.py - Configuration
src/gpu_tool/config/loader.py - Localization
src/gpu_tool/i18n/i18n.py - Test manager
src/gpu_tool/testmanager/testmanager.py
Diagnostics and execution
- System inventory
src/gpu_tool/bash/bash.py - Raw collection
src/gpu_tool/utils/check_and_save_system.py - Fieldiag menus
src/gpu_tool/menu/fd_menu.py - Command sessions
src/gpu_tool/runner/screen.py - Local execution
src/gpu_tool/runner/local.py - Log output
src/gpu_tool/log/logger.py - GPU utilities
src/gpu_tool/utils/tool.py - GPU test programs
Web interface
- Web server
src/webserver/main.py - Task interface
src/webserver/static/js/tasks.js
Web services and data
- HTTP routes
src/webserver/utils/routws.py - Network scanning
src/webserver/utils/scanner.py - Remote access
src/webserver/utils/frprun.py - WebSocket service
src/webserver/utils/ws.py - Web records
src/webserver/utils/db.py
Other components
- Operator
- Remote user
Connections 26
- Operator → CLI entry: starts CLI
- CLI entry → Core loader: creates core
- Core loader → Configuration: loads settings
- Core loader → Interactive menus: runs menus
- Interactive menus → Localization: gets labels
- Interactive menus → System inventory: requests inventory
- Interactive menus → Fieldiag menus: opens tests
- Interactive menus → Command sessions: runs commands
- Interactive menus → Log output: records results
- Interactive menus → Test manager: selects automation
- Test manager → Log output: records progress
- System inventory → GPU utilities: uses helpers
- Raw collection → Log output: saves collection
- Command sessions → GPU utilities: runs commands
- Command sessions → Log output: reports sessions
- Fieldiag menus → Command sessions: dispatches tests
- Command sessions → GPU test programs: executes
- Remote user → Web server: opens interface
- Web server → HTTP routes: registers routes
- Web server → WebSocket service: starts service
- Task interface → HTTP routes: calls task API
- HTTP routes → Web records: reads and writes
- HTTP routes → Network scanning: dispatches scans
- HTTP routes → Remote access: starts access
- HTTP routes → WebSocket service: requests client data
- WebSocket service → Web records: caches client info