# apt-get install smartmontools
# smartctl -i /dev/sda === START OF INFORMATION SECTION === Model Family: Western Digital Red Device Model: WDC WDXXXXXX-XXXXXXX LU WWN Device Id: 5 0014ee 20c672def Firmware Version: 82.00A82 User Capacity: 1,000,204,886,016 bytes [1.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5400 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Thu Sep 24 18:13:19 2020 CEST SMART support is: Available - device has SMART capability. SMART support is: Disabled
If smart is disable we can switch on with:
# smartctl -s on /dev/sda smartctl 6.6 2017-11-05 r4594 [armv6l-linux-5.4.51+] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled.
Get information about the device
# smartctl -a /dev/sda ... SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 135 125 021 Pre-fail Always - 4216 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 941 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 085 085 000 Old_age Always - 11285 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 446 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 108 193 Load_Cycle_Count 0x0032 199 199 000 Old_age Always - 4258 194 Temperature_Celsius 0x0022 111 099 000 Old_age Always - 32 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 ...
Reallocated_Sector_Ct and Current_Pending_Sector must be 0 (Zero) otherwise there is something wrong!