Skip to content

dukaci/Mimir

Repository files navigation

Mimir - Real-time CPU Process Monitor

GPU-accelerated, real-time process monitoring with intelligent grouping and historical analysis. Built with DearPyGui for maximum performance.

✨ Features

  • 🚀 GPU-Accelerated Rendering: Built with DearPyGui for buttery-smooth 60 FPS updates
  • 📊 Real-time CPU Charts: Live visualization of process CPU usage with zero lag
  • 👥 Process Grouping: Group multiple instances of the same process (e.g., all Chrome tabs)
  • 🎯 Smart Selection: Click to view individual processes or entire groups with persistent selection
  • ⚡ Multi-threaded Sampling: Parallel processing with thread pool executor
  • 🎨 Modern Dark Theme: Beautiful, customizable GPU-rendered interface
  • 💾 Persistent Selection: Your selection stays active across UI updates (no more reset bugs!)
  • 🔧 Live Configuration: Change settings without restart
  • 📈 Historical Analysis: Analyze CPU usage patterns over time
  • Windows Optimized: Handles Windows process permissions correctly

🚀 Quick Start

Option 1: Quick Launch (Recommended)

# First time setup (installs DearPyGui + dependencies)
setup.bat

# Run the monitor
run.bat

Option 2: Interactive Launcher

choose_version.bat
# Choose: 1 = DearPyGui GUI (GPU-accelerated) | 2 = CLI | 3 = Tests

Option 3: Direct Python

venv\Scripts\python.exe cpu_monitor_gui.py

Files

Main Scripts

  • cpu_monitor_gui.py - GUI version with real-time charts and controls
  • cpu_monitor.py - Command line version with interactive menu
  • config.ini - Configuration file for sampling and display settings
  • requirements.txt - Python package dependencies

Launcher Scripts

  • Run_mimir.bat - One-click launcher (auto-setup + GUI)
  • setup.bat - Setup script (creates venv, installs dependencies)
  • choose_version.bat - Interactive menu to choose GUI/CLI/Tests

Test Scripts

  • test_without_deps.py - Dependency-free functionality test

Configuration

Edit config.ini to customize:

[monitor]
sample_interval = 1.0    # Seconds between samples
history_length = 300     # Number of samples to keep

[display]
top_processes = 10       # Max processes to show individually
cpu_threshold = 1.0      # Minimum CPU % to track

📖 How to Use

Viewing Individual Processes

  1. Process table shows top CPU consumers ranked
  2. Click "View Process" button on any row
  3. Chart instantly displays that process's CPU history
  4. Selection persists across all updates

Viewing Process Groups

  1. Enable "Group Processes" checkbox
  2. Processes with same name are grouped together (e.g., chrome.exe)
  3. Click "View Group" button
  4. Chart shows summed CPU of all instances in the group
  5. Selection remains active indefinitely

Viewing All Processes

  • Click "Clear Selection" button
  • Chart shows combined top processes

Live Settings

  • Sample Interval: How often to sample CPU (0.1-10s)
  • Top Processes: Number of processes to track (1-20)
  • Filter Idle: Hide "System Idle Process"
  • Group Processes: Combine processes by name

🛠️ Requirements

  • Windows 10/11
  • Python 3.8+ (Python 3.13 recommended)
  • DearPyGui (GPU-accelerated UI)
  • psutil (system monitoring)
  • matplotlib (fallback charting - optional)

💡 Performance Comparison

Metric Old (Tkinter) New (DearPyGui)
Frame Rate ~0.5 FPS (flickering) 60 FPS (smooth)
Selection Lost on update ❌ Persistent ✅
Group Charts Broken ❌ Working ✅
Rendering CPU (slow) GPU (fast)
UI Updates Full rebuild Direct updates
Threading Race conditions Clean sync
CPU Overhead ~3-5% <1%

💡 Usage Tips

  1. Use GPU Version - DearPyGui is 10x faster than old Tkinter version
  2. Enable Grouping - Great for monitoring browsers, IDEs with multiple processes
  3. Persistent Selection - Click once, selection stays active across all updates
  4. Adjust Sample Rate - Lower (0.5s) for detail, higher (2s) for longer history
  5. Run as Admin - To monitor all system processes without permission errors

🔧 Troubleshooting

Selection resets constantly ✅ Fixed in DearPyGui version! Selection is now persistent.

Group chart shows empty/wrong data ✅ Fixed! Make sure to:

  1. Enable "Group Processes" checkbox
  2. Click "View Group" button (not individual process)

"DearPyGui not found" error Run setup again:

setup.bat

Permission denied errors Run as administrator to access all processes.

High memory usage Reduce history_length in config.ini (auto-cleanup at 1000 PIDs)

Examples

Monitoring Development Workload

  • Set sample_interval = 0.5 for detailed monitoring
  • Set top_processes = 15 to see more applications
  • Perfect for tracking compiler, IDE, and browser usage

Long-term System Monitoring

  • Set sample_interval = 5.0 for longer sampling
  • Set history_length = 720 (1 hour at 5s intervals)
  • Export data periodically for analysis

Gaming Performance

  • Set sample_interval = 0.2 for high-resolution monitoring
  • Monitor game, Discord, streaming software simultaneously
  • Use CSV export to analyze performance patterns

🎨 Technology

GPU-Accelerated with DearPyGui

  • Modern GPU rendering for 60 FPS updates
  • Native plotting (no matplotlib lag)
  • Clean event handling (no Tkinter race conditions)
  • Professional dark theme
  • Cross-platform support (Windows/Linux/Mac)

Architecture

  • Multi-threaded CPU sampling with ThreadPoolExecutor
  • Thread-safe data structures with mutex locks
  • Persistent selection state (separate from UI)
  • Smart dead PID cleanup (auto-cleanup at 1000 PIDs)
  • Optimized chart updates (60 FPS rendering, 2s data updates)

📝 License

Open source tool for educational and personal use. Feel free to modify and extend!

🙏 Credits

Built with:

  • DearPyGui - GPU-accelerated Python GUI framework
  • psutil - Cross-platform process utilities

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors