{"id":29125852,"url":"https://github.com/palaashatri/pytk-nvidia-smi-gui","last_synced_at":"2025-06-29T22:04:23.953Z","repository":{"id":301957884,"uuid":"1010777407","full_name":"palaashatri/pytk-nvidia-smi-gui","owner":"palaashatri","description":"A real-time graphical interface for monitoring NVIDIA GPU status using nvidia-smi, with color-coded metrics, process table, and power limit adjustment.","archived":false,"fork":false,"pushed_at":"2025-06-29T19:51:29.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T20:33:31.930Z","etag":null,"topics":["gpu","gui","linux","nvidia","nvidia-smi","python","tk","tools","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palaashatri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T19:27:06.000Z","updated_at":"2025-06-29T19:50:02.000Z","dependencies_parsed_at":"2025-06-29T20:33:34.568Z","dependency_job_id":"80bf0aa7-7e44-4c6b-805e-d15eb0616a2d","html_url":"https://github.com/palaashatri/pytk-nvidia-smi-gui","commit_stats":null,"previous_names":["palaashatri/pytk-nvidia-smi-gui"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/palaashatri/pytk-nvidia-smi-gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palaashatri%2Fpytk-nvidia-smi-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palaashatri%2Fpytk-nvidia-smi-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palaashatri%2Fpytk-nvidia-smi-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palaashatri%2Fpytk-nvidia-smi-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palaashatri","download_url":"https://codeload.github.com/palaashatri/pytk-nvidia-smi-gui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palaashatri%2Fpytk-nvidia-smi-gui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262674943,"owners_count":23346741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpu","gui","linux","nvidia","nvidia-smi","python","tk","tools","windows"],"created_at":"2025-06-29T22:04:23.236Z","updated_at":"2025-06-29T22:04:23.818Z","avatar_url":"https://github.com/palaashatri.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NVIDIA-SMI GUI Monitor\n\nA real-time graphical interface for monitoring NVIDIA GPU status using `nvidia-smi`, with color-coded metrics, process table, and power limit adjustment.\n\n![NVIDIA-SMI GUI Screenshot](https://github.com/user-attachments/assets/baf6e177-a31d-49b8-9844-453eb241819a)\n\n## Overview\n\nThis application provides a user-friendly GUI that displays key NVIDIA GPU information in real-time, updating every 2 seconds. It is built with Python's Tkinter library and uses the `nvidia-smi` command to fetch GPU status and running processes.\n\n## Features\n\n- 🔄 **Real-time monitoring** - Updates every 2 seconds automatically\n- 🎨 **Color-coded display** - Visual indicators for utilization, memory, temperature, and power draw\n- 📊 **Process monitoring** - Table of running GPU processes (PID, name, memory usage)\n- ⚡ **Power limit control** - Adjust GPU power limits with validation (requires admin privileges)\n- 📋 **Full nvidia-smi output** - Collapsible section showing complete nvidia-smi information\n- 🛡️ **Error handling** - Graceful handling of missing drivers or command failures\n- 🌐 **Cross-platform** - Compatible with Windows, Linux, and macOS\n- 🪶 **Lightweight** - No external dependencies, uses only Python standard library\n\n## Project Structure\n\n```\npytk-nvidia-smi-gui/\n├── App.py              # Main application file\n├── requirements.txt    # Project dependencies (Python stdlib only)\n├── LICENSE            # MIT License\n└── README.md          # This file\n```\n\n## Prerequisites\n\n### Hardware Requirements\n\n- NVIDIA GPU with compatible drivers installed\n- NVIDIA driver version that supports `nvidia-smi` command\n\n### Software Requirements\n\n- Python 3.6 or higher\n- Tkinter (usually included with Python installation)\n- NVIDIA drivers with `nvidia-smi` utility\n\n## Installation\n\n### Option 1: Download Pre-built Executable (Recommended for Windows)\n\n1. **Go to the [Releases page](https://github.com/palaashatri/pytk-nvidia-smi-gui/releases)**\n2. **Download the latest release:**\n   - **Windows**: `nvidia-smi-gui-monitor.exe` - Ready to run, no Python required!\n   - **Linux**: `nvidia-smi-gui-monitor` - Make executable with `chmod +x nvidia-smi-gui-monitor`\n3. **Run the executable directly**\n\n### Option 2: Run from Source\n\n1. **Clone or download the project:**\n\n   ```bash\n   git clone https://github.com/yourusername/pytk-nvidia-smi-gui.git\n   cd pytk-nvidia-smi-gui\n   ```\n\n2. **Verify Python installation:**\n\n   ```bash\n   python --version\n   # or\n   python3 --version\n   ```\n\n3. **Verify NVIDIA drivers:**\n\n   ```bash\n   nvidia-smi\n   ```\n\n   This command should display your GPU information. If it fails, install appropriate NVIDIA drivers.\n\n## Usage\n\n### Running the Application\n\n**If using pre-built executable:**\n\n- **Windows**: Double-click `nvidia-smi-gui-monitor.exe` or run from command prompt\n- **Linux**: `./nvidia-smi-gui-monitor` (after making it executable with `chmod +x`)\n\n**If running from source:**\n\n```bash\npython App.py\n# or\npython3 App.py\n```\n\n### Application Interface\n\n- The application opens a window titled \"NVIDIA-SMI GPU Monitor\"\n- The top displays the GPU name and a button to adjust the power limit\n- Key metrics (utilization, memory, temperature, power) are shown in a color-coded table:\n  - 🟢 **Green**: Normal/Good values\n  - 🟠 **Orange**: Warning levels\n  - 🔴 **Red**: Critical/High values\n- A table lists all running GPU processes (PID, name, memory usage)\n- A button toggles display of the full `nvidia-smi` output in a collapsible section\n- Information updates automatically every 2 seconds\n- Close the window to exit the application\n\n### Adjusting Power Limit\n\n- Click the \"Adjust Power Limit\" button to open a new window\n- The window displays current, minimum, and maximum power limits\n- Enter a new value within the allowed range and click \"Apply\"\n- **Note:** Changing the power limit may require administrator/root privileges\n\n## Configuration\n\n### Update Interval\n\nTo change the refresh rate, modify the `root.after(2000, update_gui)` line in `App.py` (2000 ms = 2 seconds).\n\n### Color Thresholds\n\nYou can adjust the warning/danger thresholds for utilization, memory, temperature, and power in the respective color functions in `App.py`:\n\n## Troubleshooting\n\n### Common Issues\n\n1. **\"nvidia-smi not found\" error:**\n   - Install NVIDIA drivers\n   - Ensure `nvidia-smi` is in your system PATH\n   - Verify GPU is NVIDIA brand\n\n2. **Python not found:**\n   - Install Python from [python.org](https://python.org)\n   - Ensure Python is added to system PATH\n\n3. **Tkinter import error:**\n\n   - On Ubuntu/Debian:\n\n     ```bash\n     sudo apt-get install python3-tk\n     ```\n\n   - On CentOS/RHEL:\n\n     ```bash\n     sudo yum install tkinter\n     ```\n\n   - On macOS: Usually included with Python\n\n4. **Permission denied (Linux/macOS):**\n\n   ```bash\n   chmod +x App.py\n   ```\n\n5. **Setting Power Limit Fails:**\n   - You may need to run the app as administrator/root to change the power limit\n   - On Linux: `sudo python App.py`\n   - On Windows: Run Command Prompt/PowerShell as Administrator\n\n## Building a Standalone Executable (Optional)\n\n### Automated Builds\n\nThis project includes GitHub Actions workflows that automatically build executables:\n\n- **Release Builds**: When you create a git tag (e.g., `v1.0.0`), executables for Windows and Linux are automatically built and attached to the GitHub release\n- **Test Builds**: Every push to main/master branch runs build tests to ensure the code compiles correctly\n\n### Manual Build\n\nYou can also compile this app into a single-file executable using PyInstaller:\n\n1. **Install PyInstaller:**\n\n   ```bash\n   pip install pyinstaller\n   ```\n\n2. **Build the executable:**\n\n   ```bash\n   pyinstaller --onefile --name nvidia-smi-gui-monitor App.py\n   ```\n\n3. **Find the executable:**\n   - The executable will be created in the `dist/` directory\n   - On Linux: `dist/nvidia-smi-gui-monitor`\n   - On Windows: `dist/nvidia-smi-gui-monitor.exe`\n\n### Creating a Release (for maintainers)\n\nTo create a new release with automatic executable builds:\n\n1. **Create and push a version tag:**\n\n   ```bash\n   git tag v1.0.0\n   git push origin v1.0.0\n   ```\n\n2. **GitHub Actions will automatically:**\n   - Build Windows and Linux executables\n   - Create a GitHub release with the tag name\n   - Attach the executables to the release\n   - Generate release notes with download instructions\n\n### Notes\n\n- The resulting executable is portable and does not require Python to be installed on the target system\n- On Linux, you may need to run `chmod +x nvidia-smi-gui-monitor` before executing\n- If you encounter issues with missing libraries (e.g., tkinter), ensure all dependencies are installed on your build system\n\n## Technical Details\n\n### Performance\n\n- **Memory Usage**: ~10-20MB RAM\n- **CPU Usage**: Minimal (periodic nvidia-smi calls)\n- **Update Frequency**: 2 seconds (configurable)\n- **Dependencies**: Python standard library only\n\n### Tested Platforms\n\n- **Windows**: 10, 11\n- **Linux**: Ubuntu 20.04+, CentOS 7+, Fedora 35+\n- **macOS**: 10.14+\n- **NVIDIA GPUs**: GTX, RTX, Tesla, Quadro series\n\n### Color Coding System\n\n- **Utilization/Memory**:\n  - Green: \u003c 70%\n  - Orange: 70-90%\n  - Red: \u003e 90%\n\n- **Temperature**:\n  - Green: \u003c 65°C\n  - Orange: 65-80°C\n  - Red: \u003e 80°C\n\n- **Power Draw**:\n  - Green: \u003c 80% of limit\n  - Orange: 80-95% of limit\n  - Red: \u003e 95% of limit\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Support\n\nFor issues and questions:\n\n1. Check the troubleshooting section above\n2. Verify system requirements\n3. Create an issue in the repository with:\n   - Your operating system\n   - Python version\n   - NVIDIA driver version\n   - Error message (if any)\n\n## Author\n\nPalaash Atri\n\n## Acknowledgments\n\n- NVIDIA for the `nvidia-smi` utility\n- Python Software Foundation for Tkinter\n- The open-source community for inspiration and feedback\n\n---\n\nMade with ❤️ for GPU monitoring enthusiasts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalaashatri%2Fpytk-nvidia-smi-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalaashatri%2Fpytk-nvidia-smi-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalaashatri%2Fpytk-nvidia-smi-gui/lists"}