A Python application that monitors SSD/NVMe drives for health changes and sends persistent desktop notifications when issues are detected.
- Automated Monitoring: Daily cron job monitors drive health
- Persistent Notifications: Critical alerts remain visible until dismissed
- Detailed Reports: Human-readable reports with drive metrics and changes
- Test Mode: Simulate changes to test notification system
- State Tracking: JSON-based state persistence for change detection
- Multi-Drive Support: Monitors all non-USB drives (SATA SSD + NVMe)
- Clone/Copy to desired directory
- Install dependencies:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt - Ensure smartmontools is installed:
sudo apt install smartmontools libnotify-bin
# Run monitoring once
python3 quiet_smart.py
# Use virtual environment
./venv/bin/python quiet_smart.py# Install daily cron job (9 AM)
python3 quiet_smart.py -c
# Remove cron job
python3 quiet_smart.py -d
# Verify cron job installation
crontab -l | grep quiet_smart# Simulate changes (all metrics appear to change from -1)
python3 quiet_smart.py --test- Reallocated Sectors: Any increase
- Media/Data Integrity Errors: Any increase
- Critical Warning: Any non-zero value
- Available Spare %: Any decrease
- Warning/Critical Temperature Time: Any increase
- Unsafe Shutdowns: Any increase
- Power On Hours
- Power Cycles
- Temperature
- Drive Model/Serial
- Capacity
- Health Status
quiet_smart/
├── quiet_smart.py # Main application
├── requirements.txt # Python dependencies
├── architecture.md # Technical documentation
├── README.md # This file
├── state.json # Previous run metrics (auto-generated)
├── report_YYYYMMDD_HHMM.txt # Reports (auto-generated)
├── cron.log # Cron job output (auto-generated)
├── backup/ # Code backups
│ └── quiet_smart.YYYYMMDD.py
└── venv/ # Virtual environment
=== SMART Drive Report - 2025-10-01 12:33:20 ===
=== Samsung SSD 850 EVO M.2 500GB (sda) ===
Serial: S33DNX0HC03586A
Capacity: 465 GB
Power On Hours: 21420
Power Cycles: 1891
Reallocated Sectors: 0
Temperature: 30°C
Available Spare %: 100
Unsafe Shutdowns: 0
Media/Data Integrity Errors: 0
Health: Excellent
When issues are detected, persistent notifications appear:
- "Drive /dev/sda: Reallocated Sectors increased from 0 to 1 (∞% change)"
- "Drive /dev/nvme0n1: Unsafe Shutdowns increased from 77 to 85 (10.4% change)"
- "Drive /dev/sdb: Available Spare decreased from 100% to 98% (-2.0% change)"
- Linux: Ubuntu/Debian-based distribution
- Python: 3.6+
- System Packages: smartmontools, libnotify-bin
- Python Packages: python-crontab
- Permissions: sudo access for smartctl commands
- Desktop: GUI environment for notifications
- Install notification system:
sudo apt install libnotify-bin - Ensure desktop environment is running
- Add user to sudoers for smartctl:
sudo visudo - Add line:
username ALL=(ALL) NOPASSWD: /usr/sbin/smartctl
- Check cron service:
sudo systemctl status cron - Verify job installation:
crontab -l - Check log file:
tail -f cron.log
This project follows user preferences for coding style including spaces in function calls and semicolons.