smart.py is a small CLI that summarizes SMART data across disks. It uses smartctl (JSON) and, when needed, supplements missing values with Seagate’s OpenSeaChest (openSeaChest_SMART). Mount points and driver hints are configurable via smartpy.env.
- Python 3
- smartmontools (
smartctlon PATH) - Optional: OpenSeaChest (
openSeaChest_SMARTon PATH or set viaSEACHEST_BIN)
Example is included. Supported keys:
MOUNT_SDA=/mnt/disks/movies– mount points per base device; multiple separated by commasDRIVER_SDA=sat,scsi– smartctl driver order per base device; if set, only this order is tried (no automatic fallback)SEACHEST_BIN=openSeaChest_SMART– path/binary name for SeaChest
Mount hints apply to the base device (e.g., MOUNT_SDA covers /dev/sda1). If no entry exists, /etc/fstab is scanned for /dev/... lines (UUID/LABEL are ignored).
- Auto-discover (sd?, nvme?, mmcblk?):
python3 smart.py - Explicit devices:
python3 smart.py /dev/sda /dev/sdb
Output per disk includes model, mount points, chosen smartctl driver, and protocol. Key lines:
- Health / Assessment
- Temperature, Power-On-Hours (with y/m/d/h breakdown)
- Reallocated / Pending / Offline-Uncorrectable
- Reasons (shown on warnings/errors or when fallbacks were used)
- smartctl: Uses JSON (
-H -A -j). Driver fromDRIVER_*or default order (auto,sat,scsi). - SeaChest: Invoked when essential fields are missing. Supplemented values/errors are noted under “Reasons”. Device is called with
--device <path> --smartAttributes. - USB/SCSI devices often hide attributes; the script calls this out explicitly.
- For many USB Seagate enclosures: set
DRIVER_SDI=satandSEACHEST_BIN=openSeaChest_SMARTinsmartpy.env. - To experiment with drivers, set a comma-separated order (e.g.,
DRIVER_SDI=sat,scsi).