A comprehensive system monitoring tool for tracking machine health metrics and performance indicators
Find a file
m1ngsama 4d87dccf62 feat: Add alert system with threshold monitoring
- 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
2025-12-05 10:00:00 +08:00
.github/workflows Add write permissions to release workflow 2025-11-25 16:23:47 +08:00
src feat: Add alert system with threshold monitoring 2025-12-05 10:00:00 +08:00
.gitignore Add data export functionality (JSON and CSV) 2024-12-08 15:45:00 +08:00
alert_system.py Implement alert system for threshold monitoring 2024-12-02 14:30:00 +08:00
Cargo.toml feat: Add project dependencies and metadata 2025-11-28 14:00:00 +08:00
CHANGELOG.md Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
config.json Add configuration file support 2024-11-20 13:00:00 +08:00
config_manager.py Add configuration file support 2024-11-20 13:00:00 +08:00
data_exporter.py Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
LICENSE Add MIT license 2024-12-28 15:45:00 +08:00
logger.py Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
MANIFEST.in Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
process_monitor.py Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
pyproject.toml Fix package build configuration for flat module structure 2025-11-25 16:18:51 +08:00
README.md Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
requirements.txt Initial commit: project structure and basic tracker 2024-11-01 09:00:00 +08:00
setup.py Fix package build configuration for flat module structure 2025-11-25 16:18:51 +08:00
temperature_monitor.py Add temperature sensor monitoring 2024-11-08 16:20:00 +08:00
test_export.py Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00
test_tracker.py Add unit tests for core functionality 2024-12-26 13:00:00 +08:00
tracker.py Release v1.0.0: Complete system monitoring solution 2025-11-25 16:12:46 +08:00

Tracker

A comprehensive system monitoring tool for tracking various machine health metrics and performance indicators.

CI Release License: MIT

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