Analyse Hard Disk Health Using SmartCTL (S.M.A.R.T.)
Use the following procedure to identify the device path on macOS:
- Open the Disk Utility
- Click the disk you want to inspect
- Press CMD+I to open the disk properties dialog
- Scroll down until you see the entry Parent disks. It shows the device name, e.g. disk3. The entry corresponds to /dev/disk3
# Install smartmontools for macOS
brew install smartmontool
# The smartctl man page shows some examples for usage
# Dump all SMART information about the disk
smartctl --all /dev/sda
# Short self test (about 2 minutes)
smartctl -t short /dev/sda
# Dump the test results (some devices allow to monitor progress using this command)
smartctl -l selftest /dev/sda
# Monitor progress of the short self test
smartctl -c /dev/sda
# Extended test (see output of the --all command to learn how long it will take)
smartctl -t long /dev/sda
References
- Thomas Krenn: SMART Tests mit smartctl (German)
- Smartmontools
- Stan Sieler: How can I determine what various /dev/disk* map to on Mac OS X / macOS?