A production-level Python script that provides real-time monitoring of CPU, memory, and disk usage, designed for performance diagnostics, automation scripts, and infrastructure monitoring.
- π Real-time CPU usage (per core)
- πΎ Memory statistics (total, used, available, usage %)
- ποΈ Disk usage (total, used, free, usage %)
- π₯οΈ Cross-platform support (Windows, Linux, macOS)
- π Automatic logging to
system_monitor.log - π οΈ Command-line arguments for customization
- β Clean and user-friendly terminal interface
- Python 3.7+
psutillibrary
Install psutil using pip:
pip install psutil