[archlinux][hardware] 查看SSD的使用寿命
因为最近把16GB的SSD做成了HDD的cache,所以比较关系寿命问题。
使用smartctl工具。
参考:https://www.v2ex.com/t/261373
linux 下面只有 smartmontools 这一个工具,而且只对像三丧和 intel 这样的大厂支持良好,其余的厂家文档不全或故意不公开接口,第三方工具就没办法了。
其中最后一个最重要和直观 “ Percentage Used Endurance Indicator ” ,单位是百分比,新的是 0%
我现在的寿命是1%, 持续观察一阵。
/home/tong/bin [tong@T7] [16:53] > sudo smartctl -l devstat /dev/sdb smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.8.11-1-ARCH] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org Device Statistics (GP Log 0x04) Page Offset Size Value Flags Description 0x05 ===== = = === == Temperature Statistics (rev 1) == 0x05 0x008 1 44 --- Current Temperature 0x05 0x010 1 - --- Average Short Term Temperature 0x05 0x018 1 - --- Average Long Term Temperature 0x05 0x020 1 54 --- Highest Temperature 0x05 0x028 1 25 --- Lowest Temperature 0x05 0x030 1 46 --- Highest Average Short Term Temperature 0x05 0x038 1 46 --- Lowest Average Short Term Temperature 0x05 0x040 1 - --- Highest Average Long Term Temperature 0x05 0x048 1 - --- Lowest Average Long Term Temperature 0x05 0x050 4 0 --- Time in Over-Temperature 0x05 0x058 1 95 --- Specified Maximum Operating Temperature 0x05 0x060 4 0 --- Time in Under-Temperature 0x05 0x068 1 0 --- Specified Minimum Operating Temperature 0x07 ===== = = === == Solid State Device Statistics (rev 1) == 0x07 0x008 1 1 N-- Percentage Used Endurance Indicator |||_ C monitored condition met ||__ D supports DSN |___ N normalized value /home/tong/bin [tong@T7] [16:54] >
百合同样做cache,在一年之后便坏掉了的SSD,目前值为161 。。。