{"id":28915885,"url":"https://github.com/maxlab/systemmonitor","last_synced_at":"2026-04-30T02:34:47.881Z","repository":{"id":300219965,"uuid":"1005570330","full_name":"Maxlab/systemmonitor","owner":"Maxlab","description":"Lenovo Legion Pro System Monitor Suite","archived":false,"fork":false,"pushed_at":"2025-06-20T13:02:53.000Z","size":12801,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T13:49:27.939Z","etag":null,"topics":["lenovo-legion-5-pro","linux","linux-sensors","linux-sesor-monitor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maxlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-20T12:44:31.000Z","updated_at":"2025-06-20T13:09:53.000Z","dependencies_parsed_at":"2025-06-20T13:49:39.184Z","dependency_job_id":"122bae07-a6b9-470e-9e0f-25171b1c7958","html_url":"https://github.com/Maxlab/systemmonitor","commit_stats":null,"previous_names":["maxlab/systemmonitor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maxlab/systemmonitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxlab%2Fsystemmonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxlab%2Fsystemmonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxlab%2Fsystemmonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxlab%2Fsystemmonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maxlab","download_url":"https://codeload.github.com/Maxlab/systemmonitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maxlab%2Fsystemmonitor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261206111,"owners_count":23124838,"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":["lenovo-legion-5-pro","linux","linux-sensors","linux-sesor-monitor"],"created_at":"2025-06-21T23:06:37.362Z","updated_at":"2026-04-30T02:34:47.869Z","avatar_url":"https://github.com/Maxlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Legion System Monitor Suite\n\n**Advanced hardware monitoring tools specifically designed for Lenovo Legion 5 Pro gaming laptops**\n\n[![Python](https://img.shields.io/badge/Python-3.7+-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Hardware](https://img.shields.io/badge/Hardware-Legion%205%20Pro-red.svg)](https://www.lenovo.com/legion)\n[![GPU](https://img.shields.io/badge/GPU-RTX%203070-brightgreen.svg)](https://www.nvidia.com)\n\n## 🎯 Purpose\n\nDiagnose and monitor **Lenovo Legion 5 Pro screen disconnection issues** through comprehensive hardware monitoring, specifically targeting thermal throttling and GPU stability problems that cause display disconnections during gaming sessions.\n\n## 🚀 Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/Maxlab/systemmonitor.git\ncd systemmonitor\n\n# Run the enhanced Legion monitor\npython3 enhanced_legion_monitor.py\n\n# Or use the interactive launcher\nchmod +x start_monitor.sh\n./start_monitor.sh\n```\n\n## 📊 Features\n\n### 🔥 Advanced Temperature Monitoring\n- **Multi-source CPU monitoring**: lm-sensors, thermal zones, direct hwmon access\n- **Direct k10temp access** for AMD Ryzen 7 5800H\n- **NVMe SSD temperature monitoring** with critical threshold parsing\n- **Hardware-defined critical temperatures** from system files\n\n### 🎮 Comprehensive GPU Analytics\n- **Multi-method GPU detection**: nvidia-smi, proc files, lspci validation\n- **RTX 3070 Mobile optimization** with throttling detection\n- **Driver version reporting** and compatibility checking\n- **Safe parsing** of GPU metrics with graceful fallback\n\n### ⚡ Power System Monitoring\n- **Battery voltage monitoring** with AC/battery status detection\n- **Power delivery analysis** for mobile gaming platform\n- **Charging status** and power source identification\n\n### 🖥️ Beautiful Terminal Interface\n```\n┌─ LEGION 5 PRO FULL MONITOR v6.0 ────────────────────────────────────┐\n│ 🔥 CPU (AMD Ryzen 7 5800H): 52.3°C (Critical: 90°C) - k10temp      │\n│ 🎮 GPU (RTX 3070 Laptop): 48.1°C - Driver: 525.60.11              │  \n│ 💾 NVMe SSD: 45.2°C (Critical: 85°C) - hwmon2                      │\n│ ⚡ Power: 19.2V (AC Connected) - Battery: 95%                       │\n│ 📊 Memory: 15.2GB/32GB (47%) │ 💿 Disk: 245GB/512GB (48%)         │\n│ 🚨 Alerts: 0 │ ⏱️  Runtime: 00:15:32 │ 📈 Samples: 468           │\n└──────────────────────────────────────────────────────────────────────┘\n```\n\n## 🛠️ Installation\n\n### Prerequisites\n- **Python 3.7+**\n- **Linux** (tested on Ubuntu 24.04+)\n- **Lenovo Legion 5 Pro** (optimal) or compatible hardware\n\n### Dependencies\nDependencies are **automatically installed** when you run the script:\n- `psutil` - System and process utilities\n- `colorama` - Terminal color support\n\n### Manual Installation\n```bash\npip3 install psutil colorama\n```\n\n## 📖 Usage\n\n### Enhanced Legion Monitor\n```bash\n# Basic monitoring\npython3 enhanced_legion_monitor.py --export json\n\n# With custom thresholds\npython3 enhanced_legion_monitor.py --cpu-temp 85 --gpu-temp 80 --disk-usage 90\n\n# Export data every 30 seconds\npython3 enhanced_legion_monitor.py --interval 30 --export-interval 30\n```\n\n### Interactive Launcher\n```bash\n./start_monitor.sh\n```\nChoose from 5 preset configurations:\n1. **Gaming Mode** - High thresholds for gaming sessions\n2. **Diagnostic Mode** - Sensitive thresholds for problem detection\n3. **Stress Test** - Extreme thresholds for hardware testing\n4. **Silent Mode** - Minimal alerts for background monitoring\n5. **Custom Mode** - User-defined thresholds\n\n## 🎮 Controls\n\n| Key | Action |\n|-----|--------|\n| `q` | Quit gracefully with data preservation |\n| `s` | Save current state to all export formats |\n| `r` | Reset alert counters and clear warnings |\n| `c` | Clear screen and refresh display |\n\n## 📁 Export Formats\n\n### JSON (Structured Data)\n```json\n{\n  \"timestamp\": \"2024-12-19T16:30:45\",\n  \"cpu\": {\n    \"temperature\": 52.3,\n    \"usage\": 23.4,\n    \"frequency\": 3200\n  },\n  \"gpu\": {\n    \"temperature\": 48.1,\n    \"usage\": 67.8,\n    \"memory_used\": 4.2,\n    \"memory_total\": 8.0\n  }\n}\n```\n\n### CSV (Time Series)\n```csv\ntimestamp,cpu_temp,cpu_usage,gpu_temp,gpu_usage,memory_usage\n2024-12-19 16:30:45,52.3,23.4,48.1,67.8,47.2\n```\n\n### TXT (Human Readable)\n```\nLegion System Monitor Report - 2024-12-19 16:30:45\nCPU: 52.3°C (23.4% usage) - Normal\nGPU: 48.1°C (67.8% usage) - Normal\nMemory: 15.2GB/32GB (47%) - Normal\n```\n\n## 🏗️ Architecture\n\n### Enhanced Legion Monitor\n- **Hardware-Specific Paths**: Direct access to Legion 5 Pro sensors\n- **TempReading Dataclass**: Structured temperature data with critical thresholds\n- **Multi-Method Validation**: Redundant hardware detection for reliability\n- **Graceful Degradation**: Works on non-Legion hardware\n- **Multi-threaded Design**: Responsive UI with background monitoring\n- **Rotating Buffers**: Memory-efficient long-term monitoring\n- **Production-Ready**: Comprehensive error handling and signal management\n\n## 🔧 Configuration\n\n### Command Line Options\n```bash\n--cpu-temp 85          # CPU temperature threshold (°C)\n--gpu-temp 80          # GPU temperature threshold (°C)\n--memory-usage 80      # Memory usage threshold (%)\n--disk-usage 90        # Disk usage threshold (%)\n--interval 2           # Monitoring interval (seconds)\n--export-interval 300  # Export interval (seconds)\n```\n\n### Configuration File\n```json\n{\n  \"thresholds\": {\n    \"cpu_temperature\": 85,\n    \"gpu_temperature\": 80,\n    \"memory_usage\": 80,\n    \"disk_usage\": 90\n  },\n  \"monitoring\": {\n    \"interval\": 2,\n    \"export_interval\": 300,\n    \"max_history\": 300\n  },\n  \"display\": {\n    \"show_graphs\": true,\n    \"color_coding\": true,\n    \"unicode_boxes\": true\n  }\n}\n```\n\n## 🎯 Legion 5 Pro Optimization\n\n### Hardware-Specific Features\n- **AMD Ryzen 7 5800H**: Direct k10temp sensor access\n- **RTX 3070 Mobile**: Enhanced throttling detection\n- **NVMe SSD**: Multi-drive temperature monitoring\n- **Battery System**: Voltage and power source monitoring\n\n### Sensor Paths\n```\nCPU Temperature: /sys/class/hwmon/hwmon3/temp1_input\nNVMe SSD Temps:  /sys/class/hwmon/hwmon2/temp{1,2,3}_input\nBattery Voltage: /sys/class/hwmon/hwmon1/in0_input\nCritical Limits: /sys/class/hwmon/hwmon*/temp*_crit\n```\n\n## 🚨 Troubleshooting\n\n### Common Issues\n\n**No GPU detected**\n```bash\n# Check NVIDIA driver installation\nnvidia-smi\nsudo apt install nvidia-driver-570\n```\n\n**Permission denied on sensor files**\n```bash\n# Add user to necessary groups\nsudo usermod -a -G adm,dialout,plugdev $USER\n# Logout and login again\n```\n\n**Temperature sensors not found**\n```bash\n# Install sensor utilities\nsudo apt install lm-sensors\nsudo sensors-detect\n```\n\n### Screen Disconnection Diagnosis\n\n1. **Monitor thermal throttling**:\n   ```bash\n   python3 enhanced_legion_monitor.py --cpu-temp 80 --gpu-temp 75\n   ```\n\n2. **Check for power delivery issues**:\n   - Watch battery voltage during gaming\n   - Monitor AC adapter connection status\n\n3. **Validate GPU stability**:\n   - Check driver version compatibility\n   - Monitor GPU temperature and throttling\n\n## 📈 Performance\n\n### System Impact\n- **CPU Overhead**: \u003c1% (2-second intervals)\n- **Memory Usage**: ~50MB with 300-sample history\n- **Startup Time**: \u003c2 seconds including hardware discovery\n- **Response Time**: Instant keyboard controls via threading\n\n### Monitoring Capabilities\n- **Temperature Accuracy**: ±1°C with direct sensor access\n- **Update Frequency**: Real-time (configurable 1-10 second intervals)\n- **History Retention**: 300 samples (configurable)\n- **Export Efficiency**: Batched writes with minimal I/O impact\n\n## 🤝 Contributing\n\n1. **Fork** the repository\n2. **Create** a feature branch: `git checkout -b feature/amazing-feature`\n3. **Commit** changes: `git commit -m 'Add amazing feature'`\n4. **Push** to branch: `git push origin feature/amazing-feature`\n5. **Open** a Pull Request\n\n### Development Setup\n```bash\ngit clone https://github.com/Maxlab/systemmonitor.git\ncd systemmonitor\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n## 📋 Requirements\n\n### Hardware Requirements\n- **Recommended**: Lenovo Legion 5 Pro (AMD Ryzen 7 5800H + RTX 3070)\n- **Minimum**: Any Linux system with temperature sensors\n- **GPU**: NVIDIA GPU with nvidia-smi support (optional)\n\n### Software Requirements\n- **OS**: Linux (Ubuntu 20.04+ recommended)\n- **Python**: 3.7 or higher\n- **Dependencies**: psutil, colorama (auto-installed)\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **Lenovo** for Legion 5 Pro hardware specifications\n- **NVIDIA** for GPU monitoring APIs\n- **Linux hwmon** subsystem for sensor access\n- **Python community** for excellent monitoring libraries\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/Maxlab/systemmonitor/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Maxlab/systemmonitor/discussions)\n- **Hardware**: Tested on Legion 5 Pro (AMD Ryzen 7 5800H + RTX 3070)\n\n---\n\n**🎮 Built for gamers, by gamers. Keep your Legion cool! 🔥** ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlab%2Fsystemmonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlab%2Fsystemmonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlab%2Fsystemmonitor/lists"}