Files
smart-report/README.md
kilyabin 19b79a4e13 feat: S.M.A.R.T. disk health monitoring with CLI and GUI
- Add core module with SMART data parsing and health calculation
- Add CLI with Rich-based terminal UI and health bar visualization
- Add GUI with PyQt6 tabs for summary and detailed views
- Support multiple health indicators (ID 231, 169, 233) for different SSD manufacturers
- Add bilingual support (Russian/English) with auto-detection
- Add GitHub Actions workflow for building binaries on Linux, Windows, macOS
- Calculate health based on reallocated sectors, pending sectors, SSD life, and more

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 00:17:01 +04:00

3.9 KiB

Smart Report 📊

S.M.A.R.T. disk health monitoring tool with both CLI and GUI interfaces.

License Python

Features

  • 🖥️ CLI Interface - Quick terminal-based health report using Rich
  • 🖱️ GUI Interface - Modern PyQt6 interface with real-time refresh
  • 💾 Multi-disk Support - Check all disks at once (HDD, SSD, NVMe)
  • 📈 Health Metrics - Temperature, wear percentage, reallocated sectors, power-on hours
  • 🎨 Color-coded Status - Easy visual identification of disk health

Screenshots

CLI Interface

$ sudo smart-report-cli

GUI Interface

$ sudo smart-report-gui

Requirements

System Dependencies

  • smartmontools - For S.M.A.R.T. data access
  • nvme-cli - For NVMe SSD support (optional)

Install on Ubuntu/Debian:

sudo apt-get install smartmontools nvme-cli

Install on Fedora/RHEL:

sudo dnf install smartmontools nvme-cli

Install on Arch Linux:

sudo pacman -S smartmontools nvme-cli

Installation

From Source

git clone https://github.com/kilyabin/smart-report.git
cd smart-report
pip install -r requirements.txt
pip install -e .

Run Without Installation

# CLI version
sudo python3 smart_report/cli.py

# GUI version
sudo python3 smart_report/gui.py

Usage

CLI Version

# Run with sudo for full access
sudo smart-report

# Or without sudo (limited data)
smart-report

GUI Version

# Run with sudo for full access
sudo smart-report-gui

# Or without sudo (limited data)
smart-report-gui

Building Binaries

Local Build

# Build CLI binary
pyinstaller --name smart-report --onefile smart_report/cli.py

# Build GUI binary
pyinstaller --name smart-report-gui --onefile --windowed smart_report/gui.py

# Binaries will be in ./dist/

GitHub Actions

Binaries are automatically built on every push and release. Download from:

  • Releases page: Pre-built binaries for Linux, Windows, macOS
  • Actions tab: Latest CI builds

Project Structure

smart-report/
├── smart_report/
│   ├── __init__.py      # Package info
│   ├── core.py          # Core SMART data collection
│   ├── cli.py           # CLI interface (Rich)
│   └── gui.py           # GUI interface (PyQt6)
├── requirements.txt     # Python dependencies
├── pyproject.toml       # Package configuration
├── setup.py             # Setup script
├── README.md            # This file
└── .github/
    └── workflows/
        └── build.yml    # GitHub Actions workflow

Development

# Install in development mode
pip install -e .

# Run CLI
python -m smart_report.cli

# Run GUI
python -m smart_report.gui

Troubleshooting

"Permission denied" errors

Run with sudo for full S.M.A.R.T. access:

sudo smart-report-cli
sudo smart-report-gui

"smartctl not found"

Install smartmontools (see Requirements above).

GUI doesn't start

Make sure PyQt6 is installed:

pip install PyQt6

NVMe drives show limited data

Install nvme-cli:

sudo apt-get install nvme-cli  # Ubuntu/Debian

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments