Skip to content

A next-level Python tool that arms your team with real-time insights into your Debian server's performance during load or stress tests. This script goes beyond typical industry standards by providing powerful data collection, intuitive data visualization, and a self-contained HTML report.

License

Notifications You must be signed in to change notification settings

rajeshkanaka/performance-monitor

Repository files navigation

πŸš€ System Performance Sentinel

Python Version License Code Style Documentation Test Coverage Last Commit

Enterprise-grade system performance monitoring with real-time analytics and beautiful visualizations πŸ“Š

Performance Sentinel Banner

✨ Features

πŸ” Comprehensive Monitoring

  • CPU Analysis: Per-core utilization, load averages, and top consumers
  • Memory Tracking: RAM usage, swap statistics, and memory-hungry processes
  • Disk Insights: I/O operations, partition usage, and storage trends
  • Network Stats: Bandwidth usage, connection tracking, and error monitoring
  • Process Management: Top resource consumers with detailed statistics

πŸ“Š Advanced Reporting

  • Real-time Visualization: Beautiful, interactive charts and graphs
  • Smart Alerts: Intelligent threshold monitoring and anomaly detection
  • Executive Summaries: Clear, actionable insights for decision-makers
  • Historical Trends: Track performance patterns over time
  • Resource Optimization: Identify bottlenecks and optimization opportunities

πŸ–₯️ Sample Report Preview

Click to see the beautiful report output πŸ‘€

Executive Summary

Executive Summary

System Overview

System Overview

Resource Utilization

Resource Charts

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip or uv package manager
  • Administrative privileges for some metrics

Installation

# Clone the repository
git clone https://github.com/yourusername/system-performance-sentinel.git
cd system-performance-sentinel

# Install using pip
pip install -r requirements.txt

# Or using uv (recommended)
uv pip install -r requirements.txt

Basic Usage

# Run with default settings (2 minutes monitoring)
python monitor_v2.py

# Custom duration (e.g., 1 hour)
python monitor_v2.py --duration 3600

# Quiet mode (minimal output)
python monitor_v2.py --quiet

# Specify report retention
python monitor_v2.py --keep-reports 10

πŸ“Š Output Examples

Console Output

10:30:15 [INFO] Starting performance monitoring for 120 seconds
10:30:15 [INFO] Reports will be saved in: /path/to/performance_reports
Collecting metrics: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 24/24 [02:00<00:00, 5.00s/sample]
10:32:15 [INFO] Generating performance report...
10:32:16 [INFO] Report generated successfully: /path/to/report.html

Generated Report

The tool generates a comprehensive HTML report with:

  • Interactive performance charts
  • System resource utilization metrics
  • Process-level analytics
  • Network and disk statistics
  • Anomaly detection and alerts

πŸ› οΈ Advanced Configuration

Custom Thresholds

THRESHOLDS = {
    'cpu_percent': 90,
    'memory_percent': 90,
    'disk_io_percent': 80,
    'load_1': (os.cpu_count() * 2),
    'load_5': (os.cpu_count() * 1.5),
    'load_15': os.cpu_count()
}

Command Line Arguments

Argument Description Default
--duration Monitoring duration in seconds 120
--keep-reports Number of reports to retain 5
--quiet Suppress progress bar and non-essential output False

πŸ”§ Development

Setting Up Development Environment

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\\Scripts\\activate   # Windows

# Install dev dependencies
pip install -r requirements-dev.txt

Running Tests

pytest tests/ -v --cov=src

πŸ“š Documentation

Detailed documentation is available in the docs directory:

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by Rajeshkanaka

About

A next-level Python tool that arms your team with real-time insights into your Debian server's performance during load or stress tests. This script goes beyond typical industry standards by providing powerful data collection, intuitive data visualization, and a self-contained HTML report.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published