1、安装smartmontools
cd /usr/ports/sysutils/smartmontools
make install clean
2、To check the status of drives, use the following:
/usr/local/sbin/smartctl -a /dev/ad0 for first ATA/SATA drive
/usr/local/sbin/smartctl -a /dev/da0 for first SCSI drive
/usr/local/sbin/smartctl -a /dev/ada0 for first SATA drive
3、输出:
SMART Attributes Data Structure revision number: 5
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
3 Spin_Up_Time 0x0020 100 100 000 Old_age Offline - 0
4 Start_Stop_Count 0x0030 100 100 000 Old_age Offline - 0
5 Reallocated_Sector_Ct 0x0032 100 100 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 17846
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 80
170 Reserve_Block_Count 0x0033 100 100 010 Pre-fail Always - 0
171 Program_Fail_Count 0x0032 100 100 000 Old_age Always - 0
172 Erase_Fail_Count 0x0032 100 100 000 Old_age Always - 0
183 Runtime_Bad_Block 0x0030 100 100 000 Old_age Offline - 0
184 End-to-End_Error 0x0032 100 100 090 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
192 Unsafe_Shutdown_Count 0x0032 100 100 000 Old_age Always - 54
199 UDMA_CRC_Error_Count 0x0030 100 100 000 Old_age Offline - 0
225 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 2318396
226 Workld_Media_Wear_Indic 0x0032 100 100 000 Old_age Always - 13052
227 Workld_Host_Reads_Perc 0x0032 100 100 000 Old_age Always - 8
228 Workload_Minutes 0x0032 100 100 000 Old_age Always - 1071609
232 Available_Reservd_Space 0x0033 100 100 010 Pre-fail Always - 0
233 Media_Wearout_Indicator 0x0032 088 088 000 Old_age Always - 0
241 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 2318396
242 Host_Reads_32MiB 0x0032 100 100 000 Old_age Always - 220318
上面红字部分证明ssd寿命还剩88%
4、参考文章
http://blog.yufeng.info/archives/1096