All notable changes to the GPU Tracker project.
- Sampling interval configuration (
-intervalflag): Configure custom sampling rates from 1 second to any duration - Database path customization (
-dbflag): Specify custom location for SQLite database - Version information (
-versionflag): Display application version
- One-shot mode (
-onceflag): Sample GPU state once and exit without starting TUI - Continuous monitoring mode (
-continuousflag): Background sampling with automatic database saves - User listing mode (
-list-usersflag): Quick summary of GPU users and their memory consumption
- JSON export (
-export json): Export complete snapshot data in JSON format - CSV export (
-export csv): Export data in CSV format for spreadsheet analysis - Output file specification (
-outputflag): Direct export output to file or stdout - Export includes full GPU metrics, process information, and timestamps
- Temperature threshold alerts (
-max-tempflag): Configurable temperature warnings (default: 90°C) - Memory threshold alerts (
-max-memflag): Configurable memory utilization warnings (default: 95%) - Visual alert indicators in TUI with red highlights
- Alert messages in stderr for continuous and one-shot modes
- Emoji indicators (
⚠️ ) for better visibility
- User filtering (key:
f): Cycle through users to focus on specific user activity - GPU filtering (key:
g): Filter view by specific GPU in multi-GPU systems - Memory sorting (key:
m): Toggle sorting of processes by memory usage - Clear filters (key:
c): Reset all active filters to full view - Active filter indicators: Visual display of currently applied filters in header
- Highlighted filtered items: Active filters shown with arrow indicators (►)
- New
Configstruct for passing configuration to TUI NewWithConfig()function for advanced TUI initialization- Backward compatible with existing
New()function
- FEATURES.md: Comprehensive feature documentation with examples
- QUICKSTART.md: Quick reference guide for common operations
- CHANGELOG.md: Version history and changes
- Enhanced README.md with usage examples and integration guides
- Advanced use case examples (monitoring, alerting, cron jobs)
- Troubleshooting section expanded
- Main function refactored to support multiple operating modes
- TUI model enhanced with filtering and configuration support
- View rendering updated to use filtered snapshots
- Help text expanded with new keyboard shortcuts
- Sample interval now configurable (was hardcoded to 5 seconds)
- Export functions integrated directly in main package
- Better separation of concerns (sampling, storage, display, export)
- More flexible architecture for future extensions
- Enhanced error handling in export functions
- Clearer status messages in TUI
- More informative help overlay
- Better user experience with filtering indicators
- Added
encoding/jsonandencoding/csvimports - Added
flagpackage for CLI argument parsing - Enhanced model struct with filter fields
- New helper functions:
getUniqueUsers(),getFilteredSnapshot() - Alert checking logic separated into
checkAlerts()function - Export logic in
exportToJSON()andexportToCSV()functions
- All existing features work unchanged
- Database format unchanged - existing databases fully compatible
- Default behavior preserved when no flags specified
- Existing keyboard shortcuts unchanged
- API compatible with version 1.0.x
- Live GPU monitoring via nvidia-smi
- Per-user GPU memory tracking
- Historical snapshot storage in SQLite
- Interactive Terminal UI (TUI) using Bubble Tea
- Auto-recording with 5-second intervals
- Manual snapshot saving
- History browsing by date and snapshot
- GPU utilization and temperature display
- Process tracking with PID to user mapping
- Beautiful lipgloss-styled interface
- Help overlay with keyboard shortcuts
/cmd/gpu-tracker/main.go: Application entry point/internal/sampler/nvidia.go: NVIDIA GPU sampling logic/internal/store/store.go: SQLite database operations/internal/tui/: Terminal UI components/internal/types/types.go: Data structures/internal/util/proc_unix.go: Process to user mapping
a: Toggle auto-recordingr: Refresh snapshots: Save snapshoth: Toggle history mode←/→: Navigate snapshots↑/↓: Navigate dayst: Jump to todayq: Quit?: Toggle help
- Go 1.21+
- Linux OS
- NVIDIA GPU with drivers
- nvidia-smi utility
- gcc for CGO (SQLite)
This project follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for added functionality (backward compatible)
- PATCH version for backward compatible bug fixes
No special steps required:
- Replace binary with new version
- All existing data preserved
- New features available via flags and key shortcuts
- No configuration changes needed
- AMD GPU support (ROCm)
- Web dashboard option
- Prometheus exporter
- Email notification system
- Historical data analysis tools
- Multi-host aggregation
- Intel GPU support
- Remote monitoring
- REST API server mode
- Grafana dashboard templates
- Docker container deployment
- Configuration file support