| Crates.io | system-monitor |
| lib.rs | system-monitor |
| version | 0.2.0 |
| created_at | 2025-08-08 07:13:10.642536+00 |
| updated_at | 2025-08-08 07:13:10.642536+00 |
| description | A system monitoring tool built in Rust |
| homepage | |
| repository | https://github.com/jagguvarma15/system-monitor |
| max_upload_size | |
| id | 1786341 |
| size | 59,338 |
A powerful, configurable system monitoring tool built in Rust that provides real-time insights into your system's performance.
git clone https://github.com/yourusername/system-monitor.git
cd system-monitor
cargo build --release
cargo run
# Default continuous monitoring (30-second intervals)
cargo run
# Generate configuration file
cargo run -- generate-config
# One-time system summary
cargo run -- summary
# Explicit monitor mode
cargo run -- monitor
# Run once and exit
cargo run -- --once
# Custom config file
cargo run -- --config custom.toml
# Help and version
cargo run -- --help
cargo run -- --version
Generate a configuration file to customize thresholds and display options:
cargo run -- generate-config
This creates a config.toml file with the following structure:
[general]
refresh_interval = 30
log_alerts = true
log_file = "system_monitor.log"
[display]
show_progress_bars = true
use_colors = true
show_per_core_cpu = true
max_processes_to_display = 10
[thresholds]
cpu_warning = 70.0
cpu_critical = 90.0
memory_warning = 70.0
memory_critical = 90.0
disk_warning = 70.0
disk_critical = 90.0
swap_warning = 70.0
swap_critical = 90.0
[alerts]
enable_desktop_notifications = false
enable_email_alerts = false
enable_sound_alerts = false
================================================
System Monitor - 2025-08-08 15:30:45
================================================
CPU INFORMATION
Overall Usage: [####----------------] 21.5%
Per Core:
Core 0: [########------------] 40.9%
Core 1: [#######-------------] 38.1%
Core 2: [######--------------] 33.5%
Core 3: [######--------------] 30.5%
MEMORY INFORMATION
RAM Usage: [################----] 80.2%
Total: 8.0 GB
Used: 6.4 GB
Available: 1.6 GB
DISK INFORMATION
Mount: / [##############------] 73.3%
Total: 460.4 GB | Used: 337.6 GB | Free: 122.9 GB
TOP PROCESSES
PID NAME CPU% MEMORY
--------------------------------------------------
1234 chrome 15.2% 512.3MB
5678 firefox 8.1% 256.1MB
SYSTEM INFORMATION
OS: Darwin
Hostname: MacBookAir
Uptime: 1647h 1m
Load Avg: 2.56, 3.57, 3.71
Press Ctrl+C to exit...
When thresholds are exceeded, alerts are:
sysinfo - System information gatheringclap - Command-line argument parsingserde & toml - Configuration file handlingcolored - Terminal color outputchrono - Date and time handlinglog & env_logger - Logging functionalitycrossterm - Cross-platform terminal manipulationsystem-monitor/
├── src/
│ └── main.rs # Main application code
├── Cargo.toml # Project dependencies
├── config.toml # Configuration file (generated)
├── README.md # This file
└── .gitignore # Git ignore rules
# Debug build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test
# Check code without building
cargo check
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
High memory usage alerts on macOS: This is often normal due to macOS memory management. Adjust thresholds in config.toml if needed.
Permission denied errors: Some system information requires elevated privileges on certain platforms.
Missing dependencies: Ensure you have the latest Rust toolchain installed.
htop and top