| Crates.io | system-alert |
| lib.rs | system-alert |
| version | 0.1.0 |
| created_at | 2025-10-14 06:18:50.704877+00 |
| updated_at | 2025-10-14 06:18:50.704877+00 |
| description | A Rust library for monitoring and visualizing system alerts. |
| homepage | https://github.com/Marky-Shi/system_alert.git |
| repository | https://github.com/Marky-Shi/system_alert.git |
| max_upload_size | |
| id | 1881748 |
| size | 9,205,092 |
A high-performance, feature-rich system monitoring tool for macOS with special optimizations for Apple Silicon chips. This tool provides real-time system metrics with an intuitive terminal user interface, smart notifications, and comprehensive configuration options.
System Alert is a professional-grade system monitoring application designed specifically for macOS, with enhanced support for Apple Silicon processors. It offers real-time monitoring of CPU, memory, battery, temperature, network, and power consumption with a beautiful terminal-based interface.
powermetricsgit clone https://github.com/yourusername/system-alert.git
cd system-alert
cargo build --release
# Run with default settings
sudo cargo run
# Run with custom refresh rate
sudo cargo run -- --refresh 2
# Run in minimal mode
sudo cargo run -- --minimal
# Run with custom config
sudo cargo run -- --config custom-config.toml

sudo ./target/release/system-alert [options]
Options:
-r, --refresh <seconds> Set refresh rate (default: 1)
-m, --minimal Use minimal display mode
-c, --config <file> Specify custom config file
-h, --help Show help message
-V, --version Show version information
The application features a modern four-quadrant layout:
🔵 CPU Section (Top Left):
🔴 Power Monitor (Top Right):
🟢 Memory Monitor (Bottom Left):
🟡 Temperature Monitor (Bottom Left):
🟣 Process Monitor (Bottom Right):
🔵 Network Monitor (Bottom Right):
The application will create a config.toml file with sensible defaults:
# System Monitor Configuration
refresh_rate = 1
minimal_mode = false
[thresholds]
cpu_warning = 75.0
cpu_critical = 90.0
memory_warning = 75
memory_critical = 90
temperature_warning = 70.0
temperature_critical = 85.0
[display]
show_temperatures = true
show_network = true
show_processes = true
show_history = true
history_size = 60
[notifications]
enabled = true
cooldown_seconds = 30
refresh_rate: Update interval in secondsminimal_mode: Enable simplified interfacecpu_warning/critical: CPU usage alert thresholds (%)memory_warning/critical: Memory usage alert thresholds (%)temperature_warning/critical: Temperature alert thresholds (°C)show_temperatures: Enable temperature monitoringshow_network: Enable network interface monitoringshow_processes: Enable process monitoringshow_history: Enable historical data trackinghistory_size: Number of data points to retainenabled: Enable/disable system notificationscooldown_seconds: Minimum time between notificationsOptimized architecture with separation of concerns for better maintainability and performance:
src/
├── main.rs # Application entry point with async event loop
├── cli.rs # Command line parsing and input handling
├── config.rs # Configuration management (TOML)
├── data_collector.rs # Async system data collection
├── battery_collector.rs # Advanced battery data collection
├── ui.rs # Terminal user interface (TUI)
├── notification.rs # Smart notification system
├── history.rs # Historical data tracking
├── types.rs # Data structures and types
└── system_info.rs # Legacy compatibility module
[profile.release]
strip = true # Remove debug symbols
opt-level = "z" # Optimize for size
lto = true # Link-time optimization
codegen-units = 1 # Single codegen unit for better optimization
panic = "abort" # Smaller binary size
Permission Denied
# Make sure to run with sudo
sudo cargo run
PowerMetrics Not Found
# Verify powermetrics is available (macOS only)
which powermetrics
High CPU Usage
# Increase refresh rate to reduce system load
sudo cargo run -- --refresh 5
Configuration Issues
# Reset to defaults by removing config file
rm config.toml
sudo cargo run
For Apple Silicon Macs, this tool provides detailed metrics:
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests.
git clone https://github.com/yourusername/system-alert.git
cd system-alert
cargo build
cargo test
This project is licensed under the MIT License - see the LICENSE file for details.