mirror of
https://github.com/m1ngsama/tracker.git
synced 2025-12-24 10:51:43 +00:00
A comprehensive system monitoring tool for tracking machine health metrics and performance indicators
- Create AlertSystem for configurable threshold checks
- Define Alert struct for alert history tracking
- Implement check_cpu_alert() for CPU threshold violations
- Implement check_memory_alert() for memory threshold violations
- Implement check_disk_alert() for disk threshold violations
- Add trigger_alert() to record and display alerts
- Maintain alert history for later analysis
- Integrate alert system into SystemMonitor
- Add visual alert indicators with ⚠️ emoji
|
||
|---|---|---|
| .github/workflows | ||
| src | ||
| .gitignore | ||
| alert_system.py | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| config.json | ||
| config_manager.py | ||
| data_exporter.py | ||
| LICENSE | ||
| logger.py | ||
| MANIFEST.in | ||
| process_monitor.py | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
| temperature_monitor.py | ||
| test_export.py | ||
| test_tracker.py | ||
| tracker.py | ||
Tracker
A comprehensive system monitoring tool for tracking various machine health metrics and performance indicators.
Features
- CPU Monitoring: Real-time CPU usage percentage tracking
- Memory Utilization: Track memory usage with detailed statistics
- Disk I/O Statistics: Monitor disk usage and I/O operations
- Network Traffic Analysis: Track network bytes sent/received
- Process Monitoring: View top processes by CPU usage
- Temperature Sensors: Monitor system temperatures (if available)
- Alert System: Configurable thresholds for CPU, memory, and disk alerts
- Logging: Automatic logging of all metrics to daily log files
- Data Export: Export monitoring data to JSON or CSV formats
- Configuration: Customizable settings via JSON config file
Installation
From PyPI (coming soon)
pip install system-tracker
From Source
git clone https://github.com/m1ngsama/tracker.git
cd tracker
pip install -r requirements.txt
Usage
Basic usage:
python tracker.py
Continuous monitoring mode:
python tracker.py --continuous --interval 5
Command line options:
-c, --continuous: Run in continuous monitoring mode-i, --interval: Set update interval in seconds (default: 5)
Configuration
The config.json file allows you to customize the tracker behavior:
{
"update_interval": 5,
"display": {
"show_cpu": true,
"show_memory": true,
"show_disk": true,
"show_network": true,
"show_processes": true,
"show_temperatures": true
},
"process_limit": 5,
"alert_thresholds": {
"cpu_percent": 80,
"memory_percent": 85,
"disk_percent": 90
}
}
Output
The tracker provides:
- Console Output: Real-time metrics displayed in the terminal
- Log Files: Daily logs stored in
logs/directory - Alerts: Visual and logged warnings when thresholds are exceeded
- Export Data: Optional data export to
exports/directory
Requirements
- Python 3.8+
- psutil
- GPUtil (for GPU monitoring)
- requests
Development
Running Tests
python test_tracker.py
Project Structure
tracker/
├── tracker.py # Main application
├── process_monitor.py # Process monitoring module
├── temperature_monitor.py # Temperature sensors module
├── config_manager.py # Configuration management
├── alert_system.py # Alert and threshold management
├── logger.py # Logging functionality
├── data_exporter.py # Data export utilities
├── config.json # Configuration file
└── requirements.txt # Python dependencies
CI/CD
This project uses GitHub Actions for:
- Continuous Integration: Automated testing on multiple OS and Python versions
- Automated Releases: Automatic package building and release creation on version tags
- Code Quality: Linting and syntax checking
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Author
m1ngsama
Acknowledgments
- Built with psutil for cross-platform system monitoring