A real-time CPU monitoring application built with Rust.
Tracks overall CPU usage and individual core performance with multi producer single consumer channels.
- Rust 1.70 or later
- Windows/Linux/macOS (any platform supported by sysinfo)
-
Clone the repository:
git clone https://github.com/yourusername/cpu-monitor.git cd cpu-monitor -
Build the project:
cargo build --release
Run the application:
cargo run --releaseThe GUI will open showing:
- Overall CPU usage with progress bar and graph
- Per-core CPU usage for each processor
- Current process count
- System information panel
Snapshots update every 100ms. If you wish to change this, change the const REFRESH_MILLISECONDS in src/config/app_variables.
The application is structured as follows:
- Main entry point (
src/main.rs): Sets up communication channels and starts background workers - App logic (
src/app/): Handles GUI updates, state management, and data processing - Workers (
src/workers/): Background threads collecting CPU, process, and system data - Snapshots (
src/snapshots/): Data structures for system information - Graph rendering (
src/graph/): Drawing utilities for charts and progress bars - Configuration (
src/config/): Constants for layout, styling, and behavior
Data flows from background workers through multi-producer-single-consumer channels to the main GUI thread.
eframe: For the GUI frameworkegui: UI components and renderingsysinfo: System information collectionstd::sync::mpsc: Inter-thread communication
- On Windows, the GUI is in light mode while on MacOS the GUI is in dark mode.
- On MacOS, the number of processes shown will be different than that in the Activity Monitor, this is because MacOS often bundles together related processes as one.
MIT License
Built with Rust, egui, and sysinfo. c:\Users\liujo\OneDrive\Documents\CPU-Monitor\README.md






