From 1e8a282b455da9abde43556e61c7115026892b02 Mon Sep 17 00:00:00 2001 From: ersonp Date: Thu, 6 Jun 2024 19:41:33 +0530 Subject: [PATCH] Update anatol/smart.go --- go.mod | 2 +- go.sum | 6 +- .../anatol/smart.go/ata_device_database.go | 19 +- .../github.com/anatol/smart.go/ioctl_linux.go | 4 +- .../anatol/smart.go/nvme_darwin.cpp | 4 +- .../github.com/anatol/smart.go/nvme_linux.go | 60 +++++- vendor/github.com/anatol/smart.go/sata.go | 171 ++++++++++++++++-- .../github.com/anatol/smart.go/sata_linux.go | 36 ++++ .../github.com/anatol/smart.go/sata_other.go | 4 + vendor/modules.txt | 2 +- 10 files changed, 268 insertions(+), 40 deletions(-) diff --git a/go.mod b/go.mod index b1e3a37f..0c60597b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/xxxserxxx/gotop/v4 require ( github.com/VictoriaMetrics/metrics v1.18.1 github.com/VividCortex/ewma v1.2.0 - github.com/anatol/smart.go v0.0.0-20220929205047-336d113af2c1 + github.com/anatol/smart.go v0.0.0-20240606135530-b987830bbb40 github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/distatus/battery v0.10.0 github.com/droundy/goopt v0.0.0-20220217183150-48d6390ad4d1 diff --git a/go.sum b/go.sum index 3476c385..fa57175b 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ github.com/VictoriaMetrics/metrics v1.18.1 h1:OZ0+kTTto8oPfHnVAnTOoyl0XlRhRkoQrD github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= -github.com/anatol/smart.go v0.0.0-20220929205047-336d113af2c1 h1:MFiXaZf1khVM2sdNeIin3cDTMthrmysd5eBuqlwIfhA= -github.com/anatol/smart.go v0.0.0-20220929205047-336d113af2c1/go.mod h1:H/rz4ePNwdNiEdxv+NRWuqONKHe2N5n7rCQftsmStNE= +github.com/anatol/smart.go v0.0.0-20240606135530-b987830bbb40 h1:sqse19Ms0KgtXGYa3FUVsT6O5AqD6dHrmRNepRvlCv4= +github.com/anatol/smart.go v0.0.0-20240606135530-b987830bbb40/go.mod h1:llkexGSe52bW0OjNva0kvIqGZxfSnVfpKHrnKBI2+pU= github.com/anatol/vmtest v0.0.0-20220413190228-7a42f1f6d7b8 h1:t4JGeY9oaF5LB4Rdx9e2wARRRPAYt8Ow4eCf5SwO3fA= github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 h1:Yg2hDs4b13Evkpj42FU2idX2cVXVFqQSheXYKM86Qsk= github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21/go.mod h1:MgJyK38wkzZbiZSKeIeFankxxSA8gayko/nr5x5bgBA= @@ -113,7 +113,7 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= diff --git a/vendor/github.com/anatol/smart.go/ata_device_database.go b/vendor/github.com/anatol/smart.go/ata_device_database.go index c94392ae..45d55fec 100644 --- a/vendor/github.com/anatol/smart.go/ata_device_database.go +++ b/vendor/github.com/anatol/smart.go/ata_device_database.go @@ -8,7 +8,7 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`Apacer SDM4 Series SSD Module`, `(2|4|8|16|32|64)GB SATA Flash Drive`, `SF(DDA01C|I2101D)`, map[int]ataDeviceAttr{160: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 162: {`Spare_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Apacer SDM5/5A/5A-M Series SSD Module`, `(1|2|4|8|16|32|64)GB SATA Flash Drive`, `SF(DK004A|DE001A)`, map[int]ataDeviceAttr{163: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Grown_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`SSD_Write_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Err_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Bad_Cluster_Table_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Apacer AS340 SSDs`, `Apacer AS340 (120|240|480|960)GB`, ``, map[int]ataDeviceAttr{163: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Later_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`SSD_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Bad_Cluster_Table_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Lifetime_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Apacer SSDs`, `([1248]|1[056]|20|3[02]|40|60|64|80|12[08]|160|240|256|320|480|512|640|960|1280|1920|3840)(GB|TB) SATA Flash Drive|S[GH]250-M2[48][02] 128GB SSD`, `SFM[BC][0-9A-Z][0-9A-Z][1-9A-Z][0-9A-Z]`, map[int]ataDeviceAttr{163: {`Maximum_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Total_Later_Bad_Blk_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`SSD_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Bad_Cluster_Table_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Lifetime_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Apacer SSDs`, `([1248]|1[056]|20|3[02]|40|60|64|80|12[08]|160|240|256|320|480|512|640|960|1024|1280|1920|2048|3840|4096)(GB|TB) SATA Flash Drive|S[GHTV]250-(M2[48][02]|25) ([1248]|1[056]|20|3[02]|40|60|64|80|12[08]|160|240|256|320|480|512|640|960|1024|1280|1920|2048|3840|4096)(GB|TB) SSD`, `SFM[BCDEGHJ][0-9A-Z][0-9A-Z][1-9A-Z][0-9A-Z]`, map[int]ataDeviceAttr{163: {`Maximum_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Total_Later_Bad_Blk_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`SSD_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Bad_Cluster_Table_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Lifetime_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Apple MacBook Air SSD`, `APPLE SSD TS(064|128)E`, ``, map[int]ataDeviceAttr{173: {`Wear_Leveling_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reades_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Apple SD/SM/TS...E/F/G SSDs`, `APPLE SSD (S[DM]|TS)0?(128|256|512|768|1024)[EFG]`, ``, map[int]ataDeviceAttr{169: {`Unknown_Apple_Attrib`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Wear_Leveling_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Host_Reads_MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Host_Writes_MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`ATP SATA III aMLC M.2 2242 Embedded SSD`, `ATP I-Temp M\.2 2242`, ``, map[int]ataDeviceAttr{1: {`Raw_Read_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 14: {`Device_Raw_Capacity`, AtaDeviceAttributeTypeRaw48, ``, 0}, 15: {`Device_User_Capacity`, AtaDeviceAttributeTypeRaw48, ``, 0}, 16: {`Initial_Spare_Blocks`, AtaDeviceAttributeTypeRaw48, ``, 0}, 17: {`Remaining_Spare_Blocks`, AtaDeviceAttributeTypeRaw48, ``, 0}, 100: {`Total_Erease_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Sectors`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Block_Erase_Failure`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpected_Power_Cycle`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Program_Fail_Blocks`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Reported_UE_Counts`, AtaDeviceAttributeTypeRaw48, ``, 0}, 194: {`Device_Temperature`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Used`, AtaDeviceAttributeTypeRaw48, ``, 0}, 205: {`Thermal_Asperity_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Controller_Temperature`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Nand_Sectors_Read`, AtaDeviceAttributeTypeRaw48, ``, 0}, 235: {`Device_Sectors_Written`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Nand_Sectors_Written`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Device_Bytes_Read`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`PCT_Life_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Spare_Block_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, @@ -17,13 +17,13 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`Crucial/Micron RealSSD m4/C400`, `C400-MTFDDA[ACK](064|128|256|512)MAM|M4-CT(032|064|128|256|512)M4SSD[123]`, ``, map[int]ataDeviceAttr{170: {`Grown_Failing_Block_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Wear_Leveling_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Non4k_Aligned_Access`, AtaDeviceAttributeTypeRaw16, ``, 0}, 183: {`SATA_Iface_Downshift`, AtaDeviceAttributeTypeRaw48, ``, 0}, 189: {`Factory_Bad_Block_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Perc_Rated_Life_Used`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Write_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Crucial/Micron Client SSDs`, `Crucial_CT(128|256|512)MX100SSD1|Crucial_CT(200|250|256|500|512|1000|1024)MX200SSD[1346]|Crucial_CT(275|525|750|1050|2050)MX300SSD[14]|Crucial_CT(120|240|480|960)M500SSD[134]|Crucial_CT(128|256|512|1024)M550SSD[134]|CT(120|240|480)BX300SSD1|CT(120|240|480|960|[12]000)BX500SSD1|CT(250|500|[124]000)MX500SSD[14]|Micron_M500_MTFDDA[KTV](120|240|480|960)MAV|Micron_M500DC_(EE|MT)FDDA[AK](120|240|480|800)MBB|(Micron[_ ])?M500IT[_ ]MTFDDA[KTY](032|050|060|064|120|128|240|256)[MS]BD|(Micron_)?M510[_-]MTFDDA[KTV](128|256)MAZ|MICRON_M510DC_(EE|MT)FDDAK(120|240|480|800|960)MBP|(Micron_)?M550[_-]MTFDDA[KTV](064|128|256|512|1T0)MAY|(Micron_M600_)?(EE|MT)FDDA[KTV](128|256|512|1T0)MBF[25Z]?(-.*)?|(Micron_1100_)?MTFDDA[KV](256|512|1T0|2T0)TBN(-.*)?|Micron 1100 SATA (256G|512G|1T|2T)B|(Micron_1300_)?(EE|MT)FDDA[KV](256|512|1T0|2T0)TDL(-.*)?`, ``, map[int]ataDeviceAttr{5: {`Reallocate_NAND_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserved_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Ave_Block-Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 180: {`Unused_Reserve_NAND_Blk`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Interfac_Downshift`, AtaDeviceAttributeTypeRaw48, ``, 0}, 184: {`Error_Correction_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Cumulativ_Corrected_ECC`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Current_Pending_ECC_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Write_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`Success_RAIN_Recov_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 223: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_LBAs_Written`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Host_Program_Page_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`FTL_Program_Page_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 252: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 253: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 254: {`Unkn_CrucialMicron_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Lexar 128GB SSD`, `Lexar 128GB SSD`, ``, map[int]ataDeviceAttr{5: {`New_Bad_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`SSD_Protect_mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Bad_Block_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Bad_Cluster_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 177: {`Read_Retry_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 180: {`Spare_Blk_Cnt_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Min_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 207: {`Max_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 208: {`Avg_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 209: {`SLC_Min_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`SLC_Max_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 211: {`SLC_Avg_Erase_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Bit_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Micron 5100 Pro / 52x0 / 5300 SSDs`, `(Micron_5100_)?(EE|MT)FDDA[KV](240|480|960|1T9|3T8|7T6)T(BY|CB|CC)|(Micron_5200_)?MTFDDAK(480|960|1T9|3T8|7T6)TD(C|D|N)|Micron_5210_MTFDDAK(480|960|1T9|3T8|7T6)QDE|Micron_5300(HC)?_MTFDDA[KV](240|480|960|1T9|3T8|7T6)TD[ST]`, ``, map[int]ataDeviceAttr{170: {`Reserved_Block_Pct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Avg_Block-Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Int_Downshift_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Write_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`RAIN_Success_Recovered`, AtaDeviceAttributeTypeRaw48, ``, 0}, 211: {`Integ_Scan_Complete_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 212: {`Integ_Scan_Folding_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 213: {`Integ_Scan_Progress`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_LBAs_Written`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Host_Program_Page_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Bckgnd_Program_Page_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Micron 5100 / 52x0 / 5300 / 5400 SSDs`, `(Micron_5100_)?(EE|MT)FDDA[KV](240|480|960|1T9|3T8|7T6)T(BY|CB|CC)|(Micron_5200_)?MTFDDAK(480|960|1T9|3T8|7T6)TD(C|D|N)|Micron_5210_MTFDDAK(480|960|1T9|3T8|7T6)QDE|Micron_5300(HC)?_MTFDDA[KV](240|480|960|1T9|3T8|7T6)TD[STU]|(Micron_5400_)?(EE|MT)FDDA[KV](240|480|960|1T9|3T8|7T6)TG[ABC]`, ``, map[int]ataDeviceAttr{170: {`Reserved_Block_Pct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Avg_Block-Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Int_Downshift_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Write_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`RAIN_Success_Recovered`, AtaDeviceAttributeTypeRaw48, ``, 0}, 211: {`Integ_Scan_Complete_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 212: {`Integ_Scan_Folding_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 213: {`Integ_Scan_Progress`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_LBAs_Written`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Host_Program_Page_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Bckgnd_Program_Page_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Micron M500DC/M510DC Enterprise SSDs`, `Micron_M500DC_(EE|MT)FDDA[AK](120|240|480|800)MBB|MICRON_M510DC_(EE|MT)FDDAK(120|240|480|800|960)MBP`, ``, map[int]ataDeviceAttr{5: {`Reallocated_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserved_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Ave_Block-Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 184: {`Error_Correction_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 188: {`Command_Timeouts`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Cumulativ_Corrected_ECC`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Write_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Host_Program_Page_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Bckgnd_Program_Page_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`SandForce Driven SSDs`, `Corsair Force LS SSD`, `S9FM01\.8`, map[int]ataDeviceAttr{1: {`Raw_Read_Error_Rate`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 9: {`Power_On_Hours_and_Msec`, AtaDeviceAttributeTypeMsec24Hour32, ``, 0}, 162: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserve_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`SandForce Driven SSDs`, `SandForce 1st Ed\.|ADATA SSD S(396|510|599) .?..GB|ADATA SP[389]00|ADATA SSD S[PX]900 (64|128|256|512)GB-DL2|ADATA XM11 (128|256)GB|ATP Velocity MIV (60|120|240|480)GB|Comay BladeDrive E28 (800|1600|3200)GB|Corsair CSSD-F(40|60|80|115|120|160|240)GBP?2.*|Corsair Voyager GTX|Corsair Force ((3 |LS )?SSD|GS|GT)|FM-25S2S-(60|120|240)GBP2|FTM(06|12|24|48)CT25H|KINGSTON SE50S37?(100|240|480)G|KINGSTON SH10[03]S3(90|120|240|480)G|KINGSTON SKC(300S37A|380S3)(60|120|180|240|480)G|KINGSTON SVP200S3(7A)?(60|90|120|240|480)G|KINGSTON SMS200S3(30|60|120)G|KINGSTON SMS450S3(32|64|128)G|KINGSTON (SV300|SKC100|SE100)S3.*G|KINGSTON SHFS37A(120|240|480)G|KINGSTON SNS4151S316GD|MKNSSDCR(45|60|90|120|180|240|360|480)GB(-(7|DX7?|MX|G2))?|MKNSSDEC(60|120|240|480|512)GB|MKNSSDAT(30|40|60|120|180|240|480)GB(-(DX|V))?|Mushkin MKNSSDCL(40|60|80|90|115|120|180|240|480)GB-DX2?|MXSSD3MDSF-(60|120)G|OCZ[ -](AGILITY2([ -]EX)?|COLOSSUS2|ONYX2|VERTEX(2|-LE))( [123]\..*)?|OCZ-NOCTI|OCZ-REVODRIVE3?( X2)?|OCZ-REVODRIVE350|OCZ[ -](VELO|VERTEX2[ -](EX|PRO))( [123]\..*)?|D2[CR]STK251...-....(\.C)?|OCZ-(AGILITY3|SOLID3|VERTEX3( LT| MI)?)|OCZ Z-DRIVE R4 [CR]M8[48]|OCZ Z-DRIVE 4500|OCZ-VELO DRIVE|TALOS2|(APOC|DENC|DENEVA|FTNC|GFGC|MANG|MMOC|NIMC|TMSC).*|(DENR|DRSAK|EC188|NIMR|PSIR|TRSAK).*|OWC Aura Pro( 6G SSD)?|OWC Mercury Electra (Pro )?[36]G SSD|OWC Mercury E(xtreme|XTREME) Pro (6G |RE )?SSD|Patriot Pyro|SanDisk SDSSDX(60|120|240|480)GG25|SanDisk SDSSDA(120|240|480)G|SuperSSpeed S301 [0-9]*GB|SG9XCS2D(0?50|100|200|400)GESLT|SSD9SC(120|240|480)GED[EA]|(TX32|TX31C1|VN0.?..GCNMK).*|(TX22D1|TX21B1).*|TX52D1.*|TS(64|128|256|512)GSSD[37]20|UGB(88P|99S)GC...H[BF].|SG9XCS(1F|2D)(50|100|200|400)GE01|VisionTek GoDrive (60|120|240|480)GB`, ``, map[int]ataDeviceAttr{1: {`Raw_Read_Error_Rate`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 9: {`Power_On_Hours_and_Msec`, AtaDeviceAttributeTypeMsec24Hour32, ``, 0}, 13: {`Soft_Read_Error_Rate`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 100: {`Gigabytes_Erased`, AtaDeviceAttributeTypeRaw48, ``, 0}, 162: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserve_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 177: {`Wear_Range_Delta`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 182: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 184: {`IO_Error_Detect_Code_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 189: {`Airflow_Temperature_Cel`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 195: {`ECC_Uncorr_Error_Count`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 198: {`Uncorrectable_Sector_Ct`, AtaDeviceAttributeTypeRaw24DivRaw32, `210zr54`, 0}, 199: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 201: {`Unc_Soft_Read_Err_Rate`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 204: {`Soft_ECC_Correct_Rate`, AtaDeviceAttributeTypeRaw24DivRaw32, ``, 0}, 218: {`Unknown_SandForce_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 230: {`Life_Curve_Status`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`SandForce_Internal`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`SandForce_Internal`, AtaDeviceAttributeTypeRaw48, ``, 0}, 235: {`SuperCap_Health`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`StorFly CFast SATA 6Gbps SSDs`, `StorFly VSFCS2C[CI](016|030|060|120|240)G-...`, ``, map[int]ataDeviceAttr{192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Spares_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Lifetime_Remaining%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Lifetime_Remaining%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Spares_Remaining_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Phison Driven SSDs`, `BP4 mSATA SSD|Corsair Force LE200 SSD|GIGABYTE GP-GSTFS31((120|240|256|480)G|100T)NTD|GOODRAM IRIDIUM PRO|IR-SSDPR-S25A-(120|240|480|960)|KINGSTON O(C|M[48S])P0S3(64|128|256|512)B-[0A]0|KINGSTON RBUSNS(4|8)180S3(32|64|128|256|512)GJ|KINGSTON SEDC400S37(400|480|800|960|1600|1800)G|KINGSTON SEDC(450R|500[MR])(480|960|1920|3840|7680)G|KINGSTON SM2280S3G2(120)G|KINGSTON SUV300S37A(120|240|480)G|KINGSTON SKC310S3B?7A960G|KINGSTON SKC400S37(128G|256G|512G|1T)|KINGSTON SV310S3(7A|D7|N7A|B7A)960G|KINGSTON SHSS3B?7A(120|240|480|960)G|KINGSTON ?SA400(M8|S37)(120|240|480|960)G|Patriot (Flare|Blast|Blaze|Burst)|PNY CS(900|1311|2211) (120|240|480|960)GB SSD|PNY ELITE PSSD|SSD Smartbuy (60|64|120|128|240|256|480|512|960|1024|2000)GB|SSD PHISON 256GB PS3110-S10C|SSDPR-CX400-(128|256|512|1024)|TEAM L3 EVO SSD (120|240|480|960)GB|SSM28(128|256|512)GPTCB3B-S11[24]61[123]`, ``, map[int]ataDeviceAttr{2: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 3: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 7: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 8: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 10: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Write_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_Phy_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Bad_Block_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Bad_Blk_Ct_Erl/Lat`, AtaDeviceAttributeTypeRaw24DivRaw24, `z54z10`, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`MaxAvgErase_Ct`, AtaDeviceAttributeTypeRaw16OptAvg16, ``, 0}, 175: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 182: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`Unknown_Phison_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 193: {`Power_Fail_Uncompl_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Power_Fail_Health`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 207: {`Thermal_Throttling_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 232: {`Read_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Flash_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 240: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Phison Driven OEM SSDs`, `GOODRAM|Hoodisk SSD|INTENSO|INTENSO SATA III SSD|SATA SSD|SPCC Solid State Disk`, `S[89AB]F[DM][0-9][0-9]\.[0-9]`, map[int]ataDeviceAttr{2: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 3: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 7: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 8: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 10: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_Phy_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Bad_Blk_Ct_Erl/Lat`, AtaDeviceAttributeTypeRaw24DivRaw24, `z54z10`, 0}, 173: {`MaxAvgErase_Ct`, AtaDeviceAttributeTypeRaw16OptAvg16, ``, 0}, 175: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 196: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Flash_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 240: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Phison Driven SSDs`, `BP4 mSATA SSD|Corsair Force LE200 SSD|GIGABYTE GP-GSTFS31((120|240|256|480)G|100T)NTD|GOODRAM IRIDIUM PRO|IRP?-SSDPR-S25[AC]-(120|240|256|480|512|960|0[12]T)|KINGSTON O(C|M[48S])P0S3(64|128|256|512)B-[0A]0|KINGSTON RBUSNS(4|8)180S3(32|64|128|256|512)GJ|KINGSTON SEDC400S37(400|480|800|960|1600|1800)G|KINGSTON SEDC(450R|500[MR])(480|960|1920|3840|7680)G|KINGSTON SM2280S3G2(120)G|KINGSTON SUV300S37A(120|240|480)G|KINGSTON SKC310S3B?7A960G|KINGSTON SKC400S37(128G|256G|512G|1T)|KINGSTON SV310S3(7A|D7|N7A|B7A)960G|KINGSTON SHSS3B?7A(120|240|480|960)G|KINGSTON SS200S330G|KINGSTON ?SA400(M8|S37)(120|240|480|960)G|Patriot (Blast|Blaze|Flare)|Patriot Burst( (120|240|480|960)GB)?|PNY CS(900|1311|2211) (120|240|480|960)GB SSD|PNY ELITE PSSD|SSD Smartbuy (60|64|120|128|240|256|480|512|960|1024|2000)GB|SSD PHISON 256GB PS3110-S10C|SSDPR-CX400-(128|256|512|1024)|TEAM L3 EVO SSD (120|240|480|960)GB|SSM28(128|256|512)GPTCB3B-S11[24]61[123]|SVM2S46(128|256|512)GNPI51UF`, ``, map[int]ataDeviceAttr{2: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 3: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 7: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 8: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 10: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Write_Protect_Mode`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_Phy_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Bad_Block_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Bad_Blk_Ct_Lat/Erl`, AtaDeviceAttributeTypeRaw24DivRaw24, `z54z10`, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`MaxAvgErase_Ct`, AtaDeviceAttributeTypeRaw16OptAvg16, ``, 0}, 175: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 181: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 182: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`Unknown_Phison_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 193: {`Power_Fail_Uncompl_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Power_Fail_Health`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 207: {`Thermal_Throttling_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 232: {`Read_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Flash_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 240: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Phison Driven OEM SSDs`, `GOODRAM|Hoodisk SSD|INTENSO|INTENSO SATA III SSD|SATA SSD|SPCC Solid State Disk`, `S[89AB]F[DM][0-9T][0-9]\.[0-9]`, map[int]ataDeviceAttr{2: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 3: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 5: {`Retired_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 7: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 8: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 10: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_Phy_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Bad_Blk_Ct_Lat/Erl`, AtaDeviceAttributeTypeRaw24DivRaw24, `z54z10`, 0}, 173: {`MaxAvgErase_Ct`, AtaDeviceAttributeTypeRaw16OptAvg16, ``, 0}, 175: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 196: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Flash_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 240: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Indilinx Barefoot based SSDs`, `Corsair CSSD-V(32|60|64|128|256)GB2|Corsair CMFSSD-(32|64|128|256)D1|CRUCIAL_CT(64|128|256)M225|G.SKILL FALCON (64|128|256)GB SSD|OCZ[ -](AGILITY|ONYX|VERTEX( 1199|-TURBO| v1\.10)?)|Patriot[ -]Torqx.*|RENICE Z2|STT_FT[MD](28|32|56|64)GX25H|TS(18|25)M(64|128)MLC(16|32|64|128|256|512)GSSD|FM-25S2I-(64|128)GBFII|TS(60|120)GSSD25D-M`, ``, map[int]ataDeviceAttr{1: {`Raw_Read_Error_Rate`, AtaDeviceAttributeTypeRaw64, ``, 0}, 9: {`Power_On_Hours`, AtaDeviceAttributeTypeRaw64, ``, 0}, 12: {`Power_Cycle_Count`, AtaDeviceAttributeTypeRaw64, ``, 0}, 184: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw64, ``, 0}, 195: {`Program_Failure_Blk_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 196: {`Erase_Failure_Blk_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 197: {`Read_Failure_Blk_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 198: {`Read_Sectors_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 199: {`Write_Sectors_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 200: {`Read_Commands_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 201: {`Write_Commands_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 202: {`Error_Bits_Flash_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 203: {`Corr_Read_Errors_Tot_Ct`, AtaDeviceAttributeTypeRaw64, ``, 0}, 204: {`Bad_Block_Full_Flag`, AtaDeviceAttributeTypeRaw64, ``, 0}, 205: {`Max_PE_Count_Spec`, AtaDeviceAttributeTypeRaw64, ``, 0}, 206: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw64, ``, 0}, 207: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw64, ``, 0}, 208: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw64, ``, 0}, 209: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw64, ``, 0}, 210: {`Indilinx_Internal`, AtaDeviceAttributeTypeRaw64, ``, 0}, 211: {`SATA_Error_Ct_CRC`, AtaDeviceAttributeTypeRaw64, ``, 0}, 212: {`SATA_Error_Ct_Handshake`, AtaDeviceAttributeTypeRaw64, ``, 0}, 213: {`Indilinx_Internal`, AtaDeviceAttributeTypeRaw64, ``, 0}}, 0}, {`Indilinx Barefoot_2/Everest/Martini based SSDs`, `OCZ VERTEX[ -]PLUS|OCZ-VERTEX PLUS R2|OCZ-OCTANE|OCZ-PETROL|OCZ-AGILITY4|OCZ-VERTEX4`, ``, map[int]ataDeviceAttr{232: {`Lifetime_Writes`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Indilinx Barefoot 3 based SSDs`, `OCZ-VECTOR(1[58]0)?|OCZ-VERTEX4[56]0A?|OCZ-SABER1000|OCZ-ARC100|Radeon R7`, ``, map[int]ataDeviceAttr{5: {`Runtime_Bad_Block`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Avail_OP_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Pwr_Cycle_Ct_Unplanned`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Total_Unc_NAND_Reads`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Total_Prog_Failures`, AtaDeviceAttributeTypeRaw48, ``, 0}, 196: {`Total_Erase_Failures`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Total_Unc_Read_Failures`, AtaDeviceAttributeTypeRaw48, ``, 0}, 198: {`Host_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`Host_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 205: {`Max_Rated_PE_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 207: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 208: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 212: {`Pages_Requiring_Rd_Rtry`, AtaDeviceAttributeTypeRaw48, ``, 0}, 213: {`Snmple_Retry_Attempts`, AtaDeviceAttributeTypeRaw48, ``, 0}, 214: {`Adaptive_Retry_Attempts`, AtaDeviceAttributeTypeRaw48, ``, 0}, 222: {`RAID_Recovery_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 224: {`In_Warranty`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`DAS_Polarity`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Partial_Pfail`, AtaDeviceAttributeTypeRaw48, ``, 0}, 230: {`Write_Throttling`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Total_NAND_Prog_Ct_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Total_NAND_Read_Ct_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, @@ -48,7 +48,7 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`Intel 330/335 Series SSDs`, `INTEL SSDSC2CT(060|120|180|240)A[34]`, ``, map[int]ataDeviceAttr{9: {`Power_On_Hours_and_Msec`, AtaDeviceAttributeTypeMsec24Hour32, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Intel 540 Series SSDs`, `INTEL SSDSC[K2]KW(120H|180H|240H|360H|480H|010X)6`, ``, map[int]ataDeviceAttr{9: {`Power_On_Hours_and_Msec`, AtaDeviceAttributeTypeMsec24Hour32, ``, 0}, 170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Intel 545s Series SSDs`, `INTEL SSDSC[2K]K[WF](128G|256G|512G|010T)8.*`, ``, map[int]ataDeviceAttr{171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 190: {`Temperature_Case`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Intel 730 and DC S35x0/3610/3700 Series SSDs`, `INTEL SSDSC(1N|2B)[ABPX]((080|100|120|150|160|200|240|300|400|480|600|800)[GH][3467][RT]?|(012|016)T[46])`, ``, map[int]ataDeviceAttr{170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Power_Loss_Cap_Test`, AtaDeviceAttributeTypeRaw16OptRaw16, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 190: {`Temperature_Case`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 194: {`Temperature_Internal`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 199: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Thermal_Throttle`, AtaDeviceAttributeTypeRaw24DivRaw32, `04321`, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 243: {`NAND_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, ataFirmwareBugXErrorLBA}, + {`Intel 730 and DC S35x0/3610/3700 Series SSDs`, `INTEL SSDSC(1N|2B)[ABPX]((080|100|120|150|160|200|240|300|400|480|600|800)[GH][3467][CERT]?|(012|016)T[46])`, ``, map[int]ataDeviceAttr{170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Power_Loss_Cap_Test`, AtaDeviceAttributeTypeRaw16OptRaw16, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 190: {`Temperature_Case`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 192: {`Unsafe_Shutdown_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 194: {`Temperature_Internal`, AtaDeviceAttributeTypeTempMinMax, ``, 0}, 199: {`CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Thermal_Throttle`, AtaDeviceAttributeTypeRaw24DivRaw32, `04321`, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 243: {`NAND_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, ataFirmwareBugXErrorLBA}, {`Intel SSD Pro 5400s Series`, `INTEL SSDSC[2K]KF(120H|180H|240H|360H|480H|010X)6`, ``, map[int]ataDeviceAttr{170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Intel DC S3110 Series SSDs`, `INTEL SSDSCKKI(128|256|512)G8`, ``, map[int]ataDeviceAttr{170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Intel 3710 Series SSDs`, `INTEL SSDSC2BA(200G|400G|800G|012T)4.?`, ``, map[int]ataDeviceAttr{9: {`Power_On_Hours_and_Msec`, AtaDeviceAttributeTypeMsec24Hour32, ``, 0}, 170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Downshift_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 187: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 226: {`Workld_Media_Wear_Indic`, AtaDeviceAttributeTypeRaw48, ``, 0}, 227: {`Workld_Host_Reads_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 228: {`Workload_Minutes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Thermal_Throttle`, AtaDeviceAttributeTypeRaw24DivRaw32, `04321`, 0}, 243: {`NAND_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, @@ -67,16 +67,16 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`SanDisk based SSDs`, `SanDisk iSSD P4 [0-9]*GB|SanDisk pSSD|SanDisk SDSSDP[0-9]*G|SanDisk SDSSDRC032G|SanDisk SSD i100 [0-9]*GB|SanDisk SSD U100 ([0-9]*GB|SMG2)|SanDisk SSD U110 (8|16|24|32|64|128)GB|SanDisk SDSA6[GM]M-[0-9]*G-.*|SanDisk SD7[SU]B[23]Q(064|128|256|512)G.*`, ``, map[int]ataDeviceAttr{165: {`Total_Write/Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Avg_Write/Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 212: {`SATA_PHY_Error`, AtaDeviceAttributeTypeRaw48, ``, 0}, 230: {`Perc_Write/Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 232: {`Perc_Avail_Resrvd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Perc_Write/Erase_Ct_BC`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Thermal_Throttle`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Sandisk SATA Cloudspeed Max and GEN2 ESS SSDs`, `SD[A-Z0-9]{2}[1-3][A-Z]{3}-?[0-9]{3}[GT]-?1[A-Z0-9]{3}`, ``, map[int]ataDeviceAttr{13: {`Lifetime_UECC_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 32: {`Lifetime_Write_AmpFctr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 33: {`Write_AmpFctr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserve_Erase_BlkCt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Percent_Life_Used`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Lifetime_Die_Failure_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 177: {`Lifetime_Remaining%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`SSD_LifeLeft(0.01%)`, AtaDeviceAttributeTypeRaw48, ``, 0}, 180: {`Undetected_Data_Err_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`LT_Link_Rate_DwnGrd_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 191: {`Clean_Shutdown_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 192: {`Unclean_Shutdown_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 196: {`Lifetime_Retried_Blk_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 204: {`Average_Block-Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 205: {`Read_Retry_Enable_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 206: {`Successful_RaidRecov_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 207: {`Trimmed_Sector_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 211: {`Read_Disturb_ReallocEvt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Lifetime_Nand_Writes`, AtaDeviceAttributeTypeRaw48, ``, 0}, 235: {`Capacitor_Health`, AtaDeviceAttributeTypeRaw48, ``, 0}, 244: {`Therm_Throt_Activation`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`Drive_Life_Remaining%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 253: {`SPI_Test_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Sandisk SATA CS1K GEN1 ESS SSDs`, `SD[A-Z0-9]{2}[NO][A-Z0-9]{3}-?[0-9]{3}[GT]-?1[A-Z0-9]{3}`, ``, map[int]ataDeviceAttr{1: {`UECC_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 2: {`Internal_File_Check`, AtaDeviceAttributeTypeRaw48, ``, 0}, 5: {`Retried_Blk_Ct`, AtaDeviceAttributeTypeRaw16OptRaw16, ``, 0}, 32: {`Write_Ampflication`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserve_Blk_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Drive_Life_Used%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_PwrLoss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`PwrLoss_ProtectionFail`, AtaDeviceAttributeTypeRaw48, ``, 0}, 177: {`DriveLife_Remaining%`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 180: {`End_to_End_Err_Detect`, AtaDeviceAttributeTypeRaw48, ``, 0}, 190: {`Drive_Temp_Warning`, AtaDeviceAttributeTypeRaw48, ``, 0}, 195: {`Uncorrectable_Err_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Exception_Mode_Status`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`Number_Of_Write_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`DriveLife_Used%`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Silicon Motion based SSDs`, `ADATA_IMSS332-((008|016|032|064|128|256|512)G|001T)[AEMT]P?|ADATA (SP550|SU(650(NS38)?|655|[89]00))|CORSAIR FORCE LX SSD|CHN mSATAM3 (128|256|512)|CIS 2S M305 (16|32|64|128|256)GB|CT(120|250|500|1000)BX100SSD1|CT(240|480|960)BX200SSD1|DREVO X1 SSD|Drevo X1 pro (64|128|256)G|JAJS[56]00M((12[08]|240|256|480|512|960)C|1TB)(-1)?|KingDian S100 (32|64)GB|KingDian S(200|280|400) ((60|120|240|480)GB|1TB)|KingSpec KSD-[PS]A25\.[1-9]-(016|032|064|128)(MS|SJ)|KINGSTON SKC600(256|512|1024|2048)G|LITEON LMH-(128|256|512)V2M-.*|LITEON LCH-(128|256V|512)2S-.*|MKNSSDRE(1TB|2TB|512GB|500GB|256GB|250GB)|MKNSSD(S2|TR)(12[08]|2[45]0|480|500)GB(-(3DL|LT))?|NFN025SA31T-.*|OWC Envoy Pro|Patriot P200 ((128|256|512)GB|[12]TB)|R3SL(120|240|480|960)G|Ramsta SSD S800 (120|240|480)GB|SED2QII-LP SATA SSD ((64|128|256|512)GB|[12]TB)|T60|TCSUNBOW [MX]3 (60|120|240)GB|TEAM( T253(TD|X6)|L5Lite3D)((120|240|256|480|512)G|[12]T)|TS((16|32|64|128|256|512)G|1T)(SSD|MS[AM])(230S?|3[67]0[SI]?|420[IK]?)|TS(16|32|64|128|512|256)GMTS4[03]0S?|TS(120|240)GMTS420S?|TS(128G|256G|512G|1T)SSD230S|TS(120|240|480|960)GSSD220S|TS((64|128|256|512)G|[12]T)SSD452K|TS(16G|32G|64G|128G|256G|512G|1T)MTS800S?|TS(16|32|64)GMSA630|TS(32|64|128)GPSD330|TS(16|32|64|96|128|256)GSSD(630|360S)|TS(128G|256G|512G|1T)ESD400K|TS(128G|256G|512G|1T)MTS830S|TSG(16|32|64|128|256|512)MTS400ISI|UMAX 2242 (128|256|512)GB`, ``, map[int]ataDeviceAttr{148: {`Total_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 149: {`Max_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 150: {`Min_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 151: {`Average_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 159: {`DRAM_1_Bit_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Valid_Spare_Block_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 162: {`Cache_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`Max_Erase_Count_of_Spec`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`Runtime_Invalid_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`TLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`SLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Raid_Recoverty_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Silicon Motion based SSDs`, `ADATA_IMSS332-((008|016|032|064|128|256|512)G|001T)[AEMT]P?|ADATA (SP550|SU(650(NS38)?|655|[89]00))|CORSAIR FORCE LX SSD|CHN mSATAM3 (128|256|512)|CIS 2S M305 (16|32|64|128|256)GB|CT(120|250|500|1000)BX100SSD1|CT(240|480|960)BX200SSD1|DREVO X1 SSD|Drevo X1 pro (64|128|256)G|JAJS[56]00M((12[08]|240|256|480|512|960)C|1TB)(-1)?|KingDian S100 (32|64)GB|KingDian S(200|280|400) ((60|120|240|480)GB|1TB)|KingSpec KSD-[PS]A25\.[1-9]-(016|032|064|128)(MS|SJ)|KINGSTON SKC600(MS)?(256|512|1024|2048)G|LITEON LMH-(128|256|512)V2M-.*|LITEON LCH-(128|256V|512)2S-.*|MKNSSDRE(1TB|2TB|512GB|500GB|256GB|250GB)|MKNSSD(S2|TR)(12[08]|2[45]0|480|500)GB(-(3DL|LT))?|NFN025SA31T-.*|OWC Envoy Pro|Patriot P200 ((128|256|512)GB|[12]TB)|R3SL(120|240|480|960)G|Ramsta SSD S800 (120|240|480)GB|SED2QII-LP SATA SSD ((64|128|256|512)GB|[12]TB)|T60|TCSUNBOW [MX]3 (60|120|240)GB|TEAM( T253(TD|X6)|L5Lite3D)((120|240|256|480|512)G|[12]T)|TS((16|32|64|128|256|512)G|1T)(SSD|MS[AM])(230S?|3[67]0[SI]?|420[IK]?)|TS(16|32|64|128|512|256)GMTS4[03]0S?|TS(120|240)GMTS420S?|TS(128G|256G|512G|1T)SSD230S|TS(120|240|480|960)GSSD220S|TS((64|128|256|512)G|[12]T)SSD452K|TS(16G|32G|64G|128G|256G|512G|1T)MTS800S?|TS(16|32|64)GMSA630|TS(32|64|128)GPSD330|TS(16|32|64|96|128|256)GSSD(630|360S)|TS(128G|256G|512G|1T)ESD400K|TS(128G|256G|512G|1T)MTS830S|TSG(16|32|64|128|256|512)MTS400ISI|UMAX 2242 (128|256|512)GB`, ``, map[int]ataDeviceAttr{148: {`Total_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 149: {`Max_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 150: {`Min_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 151: {`Average_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 159: {`DRAM_1_Bit_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Valid_Spare_Block_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 162: {`Cache_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`Max_Erase_Count_of_Spec`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`Runtime_Invalid_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`TLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`SLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Raid_Recoverty_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 249: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Supermicro SATA DOM (SuperDOM)`, `SuperMicro SSD`, ``, map[int]ataDeviceAttr{1: {`Raw_Read_Error_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 15: {`User_Cpcty_Sector_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Minimum_PE_Cycles_TLC`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`Maximum_PE_Cycles_TLC`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`SSD_Life_Left`, AtaDeviceAttributeTypeRaw48, ``, 0}, 233: {`NAND_Writes_1GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Lifetime_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Lifetime_Reads_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, - {`Silicon Motion based OEM SSDs`, `240GB|Dogfish SSD (128|256|512)GB|GIM(16|32|64|128|256|512)|INTENSO|Intenso SSD|Intenso ?SSD Sata III|KingFast|LDLC|ORTIAL SSD|RX7 (240|256|512)G|SATA3 ((12[08]|240|256|480)G|[12]T)B SSD|SPCC M\.2 SSD|T-FORCE (128|256|512)GB|Verbatim Vi550 S3`, `KFS03005|P0510E|P0725A|Q(0627|1107)A0|R0817B0|S(0424|0618|1211|1230)A0|S112[78]B0|T0(311|519|910)A0|U(0401|1124)A0`, map[int]ataDeviceAttr{148: {`Total_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 149: {`Max_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 150: {`Min_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 151: {`Average_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 159: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Valid_Spare_Block_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`Max_Erase_Count_of_Spec`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`Runtime_Invalid_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`TLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`SLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Raid_Recoverty_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Silicon Motion based OEM SSDs`, `240GB|Dogfish SSD (128|256|512)GB|GIM(16|32|64|128|256|512)|INTENSO|Intenso SSD|Intenso ?SSD Sata III|KingFast|KSM512|LDLC|ORTIAL SSD|RX7 (240|256|512)G|SATA3 ((12[08]|240|256|480)G|[12]T)B SSD|SPCC M\.2 SSD|T-FORCE (128|256|512)GB|Verbatim Vi550 S3`, `KFS03005|P0510E|P0725A|Q(0627|1107)A0|R0817B0|S(0424|0509|0618|1211|1230)A0|S112[78]B0|T0(311|519|910)A0|U(0202|0401|1124)A0`, map[int]ataDeviceAttr{148: {`Total_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 149: {`Max_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 150: {`Min_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 151: {`Average_SLC_Erase_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 159: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 160: {`Uncorrectable_Error_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 161: {`Valid_Spare_Block_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 163: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 164: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 165: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 166: {`Min_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 167: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`Max_Erase_Count_of_Spec`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 178: {`Runtime_Invalid_Blk_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 225: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 242: {`Host_Reads_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 245: {`TLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 246: {`SLC_Writes_32MiB`, AtaDeviceAttributeTypeRaw48, ``, 0}, 247: {`Raid_Recoverty_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 248: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Unkn_SiliconMotion_Attr`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`SMART Modular Technologies mSATA XL+ SLC SSDs`, `SH9MST6D[0-9]*GJSI?[0-9]*`, ``, map[int]ataDeviceAttr{1: {`Uncorrectable_ECC_Cnt`, AtaDeviceAttributeTypeRaw48, ``, 0}, 9: {`Power_On_Hours`, AtaDeviceAttributeTypeRaw48, ``, 0}, 14: {`Device_Capacity_LBAs`, AtaDeviceAttributeTypeRaw48, ``, 0}, 15: {`User_Capacity_LBAs`, AtaDeviceAttributeTypeRaw48, ``, 0}, 16: {`Init_Spare_Blocks_Avail`, AtaDeviceAttributeTypeRaw48, ``, 0}, 17: {`Spare_Blocks_Remaining`, AtaDeviceAttributeTypeRaw48, ``, 0}, 100: {`Total_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 168: {`SATA_PHY_Err_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Initial_Bad_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Max_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`Average_Erase_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 198: {`Not_In_Use`, AtaDeviceAttributeTypeRaw48, ``, 0}, 199: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Perc_Rated_Life_Used`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Perc_Rated_Life_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 232: {`Read_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Flash_Reads_LBAs`, AtaDeviceAttributeTypeRaw48, ``, 0}, 235: {`Flash_Writes_LBAs`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Smart Storage Systems Xcel-10 SSDs`, `SMART A25FD-(32|64|128)GI32N`, ``, map[int]ataDeviceAttr{1: {`Not_Supported`, AtaDeviceAttributeTypeRaw48, ``, 0}, 2: {`Not_Supported`, AtaDeviceAttributeTypeRaw48, ``, 0}, 191: {`Not_Supported`, AtaDeviceAttributeTypeRaw48, ``, 0}, 197: {`ECC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 251: {`Min_Spares_Remain_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 252: {`Added_Bad_Flash_Blk_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 254: {`Total_Erase_Blocks_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Smart Storage Systems XceedSecure2 SSDs`, `(SMART|Adtron) ([AIS]25FBS|S35FCS).*`, ``, map[int]ataDeviceAttr{9: {`Power_On_Hours`, AtaDeviceAttributeTypeSec2Hour, ``, 0}, 194: {`Proprietary_194`, AtaDeviceAttributeTypeHex64, ``, 0}}, 0}, {`Smart Storage Systems XceedUltraX/Adtron A25FBX SSDs`, `(SMART|Adtron) (A|I)25FBX.*`, ``, map[int]ataDeviceAttr{9: {`Proprietary_9`, AtaDeviceAttributeTypeHex64, ``, 0}, 194: {`Proprietary_194`, AtaDeviceAttributeTypeHex48, ``, 0}}, 0}, {`Smart Storage Systems Adtron A25FB 2xN SSDs`, `(SMART|Adtron) A25FB.*2.N`, ``, map[int]ataDeviceAttr{110: {`Proprietary_HWC`, AtaDeviceAttributeTypeHex64, ``, 0}, 111: {`Proprietary_MP`, AtaDeviceAttributeTypeHex64, ``, 0}, 112: {`Proprietary_RtR`, AtaDeviceAttributeTypeHex64, ``, 0}, 113: {`Proprietary_RR`, AtaDeviceAttributeTypeHex64, ``, 0}, 120: {`Proprietary_HFAll`, AtaDeviceAttributeTypeHex64, ``, 0}, 121: {`Proprietary_HF1st`, AtaDeviceAttributeTypeHex64, ``, 0}, 122: {`Proprietary_HF2nd`, AtaDeviceAttributeTypeHex64, ``, 0}, 123: {`Proprietary_HF3rd`, AtaDeviceAttributeTypeHex64, ``, 0}, 125: {`Proprietary_SFAll`, AtaDeviceAttributeTypeHex64, ``, 0}, 126: {`Proprietary_SF1st`, AtaDeviceAttributeTypeHex64, ``, 0}, 127: {`Proprietary_SF2nd`, AtaDeviceAttributeTypeHex64, ``, 0}, 128: {`Proprietary_SF3rd`, AtaDeviceAttributeTypeHex64, ``, 0}, 194: {`Fractional_Temperature`, AtaDeviceAttributeTypeRaw24DivRaw32, `zvzzzw`, 0}}, 0}, {`Smart Storage Systems Adtron A25FB 3xN SSDs`, `(SMART|Adtron) A25FB-.*3.N`, ``, map[int]ataDeviceAttr{9: {`Power_On_Hours`, AtaDeviceAttributeTypeSec2Hour, ``, 0}, 113: {`Proprietary_RR`, AtaDeviceAttributeTypeHex48, ``, 0}, 130: {`Minimum_Spares_All_Zs`, AtaDeviceAttributeTypeRaw48, `54321`, 0}}, 0}, - {`SSSTC ER2 GD/CD Series SSDs`, `SSSTC ER2-[CG]D(240|480|960|1920)A?`, ``, map[int]ataDeviceAttr{170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Average_PE_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`PwrLoss_ProtectionFail`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Iface_Downshift`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 243: {`NAND_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`SSSTC ERX GD/CD Series SSDs`, `(SSSTC|SATA) ER[2-9]-[CG]D(240|480|960|1920)A?|AF[2-9]MA31DT[ED]LT(240|480|960|1920)A?`, ``, map[int]ataDeviceAttr{100: {`Max_Min_EC_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Available_Reservd_Space`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Average_PE_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 175: {`PwrLoss_ProtectionFail`, AtaDeviceAttributeTypeRaw48, ``, 0}, 180: {`Over-Provisioning_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 183: {`SATA_Iface_Downshift`, AtaDeviceAttributeTypeRaw48, ``, 0}, 202: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 210: {`Raid_Success_Recover_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 229: {`PLP_Failure`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Remaining_Lifetime_Perc`, AtaDeviceAttributeTypeRaw48, ``, 0}, 234: {`Thermal_Throttle_Status`, AtaDeviceAttributeTypeRaw48, ``, 0}, 243: {`NAND_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`STEC Mach2 CompactFlash Cards`, `STEC M2P CF 1.0.0`, ``, map[int]ataDeviceAttr{100: {`Erase_Program_Cycles`, AtaDeviceAttributeTypeRaw48, ``, 0}, 103: {`Remaining_Energy_Storg`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Reserved_Block_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 171: {`Program_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 172: {`Erase_Fail_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 173: {`Wear_Leveling_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 174: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 211: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}, 212: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Transcend CompactFlash Cards`, `TRANSCEND|TS(4|8|16)GCF(133|150)`, ``, map[int]ataDeviceAttr{7: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}, 8: {`Unknown_Attribute`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Xmore Industrial SATA SSDs`, `(CFAST|M2[AC]A|MSATA|SSD)[0-9]{3}[GT]XA[CEI][MT][MST]-[0-9]{3}[TZ]`, ``, map[int]ataDeviceAttr{168: {`SATA_Phy_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 169: {`Bad_Block_Rate`, AtaDeviceAttributeTypeRaw48, ``, 0}, 170: {`Bad_Blk_Ct_Lat/Erl`, AtaDeviceAttributeTypeRaw24DivRaw24, `z54z10`, 0}, 173: {`MaxAvgErase_Ct`, AtaDeviceAttributeTypeRaw16OptAvg16, ``, 0}, 192: {`Unexpect_Power_Loss_Ct`, AtaDeviceAttributeTypeRaw48, ``, 0}, 218: {`SATA_CRC_Error_Count`, AtaDeviceAttributeTypeRaw48, ``, 0}, 231: {`Percent_Lifetime_Remain`, AtaDeviceAttributeTypeRaw48, ``, 0}, 241: {`Host_Writes_GiB`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, @@ -304,7 +304,9 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`Western Digital Ultrastar DC HC530`, `WDC ?WUH721414ALE6[0L]4`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Western Digital Ultrastar DC HC550`, `(WDC ?)?WUH72181[68]AL[EN]6[0L][0146]`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Western Digital Ultrastar DC HC560`, `(WDC ?)?WUH722020[AB]L[EN]6[0L][014]`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}, 82: {`Head_Health_Score`, AtaDeviceAttributeTypeRaw16, ``, 0}, 90: {`NAND_Master`, AtaDeviceAttributeTypeHex48, ``, 0}}, 0}, + {`Western Digital Ultrastar DC HC570`, `(WDC ?)?WUH722222[AB]L[EN]6[0L]4`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}, 71: {`Milli_Micro_Actuator`, AtaDeviceAttributeTypeRaw16, ``, 0}, 82: {`Head_Health_Score`, AtaDeviceAttributeTypeRaw16, ``, 0}, 90: {`NAND_Master`, AtaDeviceAttributeTypeHex48, ``, 0}}, 0}, {`Western Digital Ultrastar DC HC650`, `(WDC ?)?WSH7220(20|VC)AL[EN]6[0L][0146]`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Western Digital Ultrastar DC HC670`, `(WDC ?)?WSH722222[AB]L[EN]6[0L]4`, ``, map[int]ataDeviceAttr{22: {`Helium_Level`, AtaDeviceAttributeTypeRaw48, ``, 0}, 71: {`Milli_Micro_Actuator`, AtaDeviceAttributeTypeRaw16, ``, 0}, 82: {`Head_Health_Score`, AtaDeviceAttributeTypeRaw16, ``, 0}, 90: {`NAND_Master`, AtaDeviceAttributeTypeHex48, ``, 0}}, 0}, {`HGST MegaScale 4000`, `HGST HMS5C4040[AB]LE64[01]`, ``, nil, 0}, {`Toshiba 2.5" HDD (10-20 GB)`, `TOSHIBA MK(101[67]GAP|15[67]GAP|20(1[678]GAP|(18|23)GAS))`, ``, nil, 0}, {`Toshiba 2.5" HDD (30-60 GB)`, `TOSHIBA MK((6034|4032)GSX|(6034|4032)GAX|(6026|4026|4019|3019)GAXB?|(6025|6021|4025|4021|4018|3025|3021|3018)GAS|(4036|3029)GACE?|(4018|3017)GAP)`, ``, nil, 0}, @@ -344,6 +346,7 @@ var ataDevicesDatabase = []ataDeviceInfo{ {`Toshiba MG07ACA... Enterprise Capacity HDD`, `TOSHIBA MG07ACA1[24]T[AE]Y?`, ``, map[int]ataDeviceAttr{23: {`Helium_Condition_Lower`, AtaDeviceAttributeTypeRaw48, ``, 0}, 24: {`Helium_Condition_Upper`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Toshiba MG08ACA... Enterprise Capacity HDD`, `TOSHIBA MG08ACA1[46]T[AE]Y?`, ``, map[int]ataDeviceAttr{23: {`Helium_Condition_Lower`, AtaDeviceAttributeTypeRaw48, ``, 0}, 24: {`Helium_Condition_Upper`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Toshiba MG09ACA... Enterprise Capacity HDD`, `TOSHIBA MG09ACA1[68]T[AE]Y?`, ``, map[int]ataDeviceAttr{23: {`Helium_Condition_Lower`, AtaDeviceAttributeTypeRaw48, ``, 0}, 24: {`Helium_Condition_Upper`, AtaDeviceAttributeTypeRaw48, ``, 0}, 27: {`MAMR_Health_Monitor`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, + {`Toshiba MG10ACA... Enterprise Capacity HDD`, `TOSHIBA MG10ACA20T[AE]Y?`, ``, map[int]ataDeviceAttr{23: {`Helium_Condition_Lower`, AtaDeviceAttributeTypeRaw48, ``, 0}, 24: {`Helium_Condition_Upper`, AtaDeviceAttributeTypeRaw48, ``, 0}, 27: {`MAMR_Health_Monitor`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, {`Toshiba 3.5" DT01ABA... Desktop HDD`, `TOSHIBA DT01ABA(100|150|200|300)`, ``, nil, 0}, {`Toshiba 3.5" DT01ACA... Desktop HDD`, `TOSHIBA DT01ACA(025|032|050|075|100|150|200|300)`, ``, nil, 0}, {`Toshiba N300/MN NAS HDD`, `TOSHIBA HDW([GNQ]1[468]0|G(480|11A|21[CE]|31G))|TOSHIBA MN0(4ACA400|6ACA([68]00|10T)|7ACA1[24]T|8ACA1[46]T)`, ``, map[int]ataDeviceAttr{23: {`Helium_Condition_Lower`, AtaDeviceAttributeTypeRaw48, ``, 0}, 24: {`Helium_Condition_Upper`, AtaDeviceAttributeTypeRaw48, ``, 0}}, 0}, diff --git a/vendor/github.com/anatol/smart.go/ioctl_linux.go b/vendor/github.com/anatol/smart.go/ioctl_linux.go index 749d3031..25691dc2 100644 --- a/vendor/github.com/anatol/smart.go/ioctl_linux.go +++ b/vendor/github.com/anatol/smart.go/ioctl_linux.go @@ -1,6 +1,8 @@ package smart -import "golang.org/x/sys/unix" +import ( + "golang.org/x/sys/unix" +) const ( directionNone = 0 diff --git a/vendor/github.com/anatol/smart.go/nvme_darwin.cpp b/vendor/github.com/anatol/smart.go/nvme_darwin.cpp index 060a7f74..875a32d7 100644 --- a/vendor/github.com/anatol/smart.go/nvme_darwin.cpp +++ b/vendor/github.com/anatol/smart.go/nvme_darwin.cpp @@ -32,8 +32,8 @@ unsigned int smart_nvme_open_darwin(const char *path, void **ptr) { IOCFPlugInInterface **plugin; struct smart_nvme_darwin *nvme; - CFMutableDictionaryRef matcher = IOBSDNameMatching(kIOMasterPortDefault, 0, path); - io_object_t disk = IOServiceGetMatchingService(kIOMasterPortDefault, matcher); + CFMutableDictionaryRef matcher = IOBSDNameMatching(kIOMainPortDefault, 0, path); + io_object_t disk = IOServiceGetMatchingService(kIOMainPortDefault, matcher); while (!is_smart_capable(disk)) { io_object_t prevdisk = disk; diff --git a/vendor/github.com/anatol/smart.go/nvme_linux.go b/vendor/github.com/anatol/smart.go/nvme_linux.go index eeb2f127..592a3fe3 100644 --- a/vendor/github.com/anatol/smart.go/nvme_linux.go +++ b/vendor/github.com/anatol/smart.go/nvme_linux.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/binary" "fmt" + "syscall" "unsafe" "golang.org/x/sys/unix" @@ -38,6 +39,29 @@ type nvmePassthruCmd64 struct { result uint64 } +var nvmeIoctlAdminCmd = iowr('N', 0x41, unsafe.Sizeof(nvmePassthruCmd{})) + +type nvmePassthruCmd struct { + opcode uint8 + flags uint8 + _ uint16 + nsid uint32 + cdw2 uint32 + cdw3 uint32 + metadata uint64 + addr uint64 + metadataLen uint32 + dataLen uint32 + cdw10 uint32 + cdw11 uint32 + cdw12 uint32 + cdw13 uint32 + cdw14 uint32 + cdw15 uint32 + timeoutMs uint32 + result uint32 +} + type NVMeDevice struct { fd int } @@ -78,7 +102,21 @@ func nvmeReadLogPage(fd int, logID uint8, buf []byte) error { return fmt.Errorf("invalid buffer size") } - cmd := nvmePassthruCmd64{ + cmd64 := nvmePassthruCmd64{ + opcode: nvmeAdminGetLogPage, + nsid: 0xffffffff, // controller-level SMART info + addr: uint64(uintptr(unsafe.Pointer(&buf[0]))), + dataLen: uint32(bufLen), + cdw10: uint32(logID) | (((uint32(bufLen) / 4) - 1) << 16), + } + + err := ioctl(uintptr(fd), nvmeIoctlAdmin64Cmd, uintptr(unsafe.Pointer(&cmd64))) + if err != syscall.ENOTTY { + return err + } + + // fallback to legacy 32bit struct + cmd := nvmePassthruCmd{ opcode: nvmeAdminGetLogPage, nsid: 0xffffffff, // controller-level SMART info addr: uint64(uintptr(unsafe.Pointer(&buf[0]))), @@ -86,11 +124,25 @@ func nvmeReadLogPage(fd int, logID uint8, buf []byte) error { cdw10: uint32(logID) | (((uint32(bufLen) / 4) - 1) << 16), } - return ioctl(uintptr(fd), nvmeIoctlAdmin64Cmd, uintptr(unsafe.Pointer(&cmd))) + return ioctl(uintptr(fd), nvmeIoctlAdminCmd, uintptr(unsafe.Pointer(&cmd))) } func (d *NVMeDevice) readIdentifyData(nsid, cns int, data []byte) error { - cmd := nvmePassthruCmd64{ + cmd64 := nvmePassthruCmd64{ + opcode: nvmeAdminIdentify, + nsid: uint32(nsid), + addr: uint64(uintptr(unsafe.Pointer(&data[0]))), + dataLen: uint32(len(data)), + cdw10: uint32(cns), + } + + err := ioctl(uintptr(d.fd), nvmeIoctlAdmin64Cmd, uintptr(unsafe.Pointer(&cmd64))) + if err != syscall.ENOTTY { + return err + } + + // fallback to legacy 32bit struct + cmd := nvmePassthruCmd{ opcode: nvmeAdminIdentify, nsid: uint32(nsid), addr: uint64(uintptr(unsafe.Pointer(&data[0]))), @@ -98,7 +150,7 @@ func (d *NVMeDevice) readIdentifyData(nsid, cns int, data []byte) error { cdw10: uint32(cns), } - return ioctl(uintptr(d.fd), nvmeIoctlAdmin64Cmd, uintptr(unsafe.Pointer(&cmd))) + return ioctl(uintptr(d.fd), nvmeIoctlAdminCmd, uintptr(unsafe.Pointer(&cmd))) } func (d *NVMeDevice) readControllerIdentifyData() (*NvmeIdentController, error) { diff --git a/vendor/github.com/anatol/smart.go/sata.go b/vendor/github.com/anatol/smart.go/sata.go index ceb39e2b..52e5996f 100644 --- a/vendor/github.com/anatol/smart.go/sata.go +++ b/vendor/github.com/anatol/smart.go/sata.go @@ -19,9 +19,10 @@ const ( _ATA_IDENTIFY_DEVICE = 0xec // ATA feature register values for SMART - _SMART_READ_DATA = 0xd0 - _SMART_READ_LOG = 0xd5 - _SMART_RETURN_STATUS = 0xda + _SMART_READ_DATA = 0xd0 + _SMART_READ_THRESHOLDS = 0xd1 + _SMART_READ_LOG = 0xd5 + _SMART_RETURN_STATUS = 0xda ) // AtaIdentifyDevice ATA IDENTIFY DEVICE struct. ATA8-ACS defines this as a page of 16-bit words. @@ -29,14 +30,38 @@ const ( // single word, and are bitmasked together with other fields. Since many of the fields are now // retired / obsolete, we only define the fields that are currently used by this package. type AtaIdentifyDevice struct { - GeneralConfig uint16 // Word 0, general configuration. If bit 15 is zero, device is ATA. - _ [9]uint16 // ... - SerialNumberRaw [20]byte // Word 10..19, device serial number, padded with spaces (20h). - _ [3]uint16 // ... - FirmwareRevisionRaw [8]byte // Word 23..26, device firmware revision, padded with spaces (20h). - ModelNumberRaw [40]byte // Word 27..46, device model number, padded with spaces (20h). - _ [28]uint16 // ... - QueueDepth uint16 // Word 75, Maximum queue depth – 1 + GeneralConfig uint16 // Word 0, general configuration. If bit 15 is zero, device is ATA. + _ [9]uint16 // ... + SerialNumberRaw [20]byte // Word 10..19, device serial number, padded with spaces (20h). + _ [3]uint16 // ... + FirmwareRevisionRaw [8]byte // Word 23..26, device firmware revision, padded with spaces (20h). + ModelNumberRaw [40]byte // Word 27..46, device model number, padded with spaces (20h). + _ [2]uint16 // ... + // Capabilities (see 7.12.7.17) + // Word 49 + // 15:14 Reserved for the IDENTIFY PACKET DEVICE command. + // 13: 1 = Standby timer values as specified in this standard are supported. + // 0 = Standby timer values shall be vendor specific. + // 12 Reserved for the IDENTIFY PACKET DEVICE command. + // 11: 1 = IORDY (see ATA8-APT) supported + // 0 = IORDY (see ATA8-APT) may be supported + // 10 IORDY (see ATA8-APT) may be disabled + // 9 Shall be set to one (i.e., LBA is supported). + // 8 DMA supported + // 7:2 Reserved + // 1:0 Long Physical Sector Alignment Error reporting + // Word 50 Capabilities (see 7.12.7.17) + // 15 Shall be cleared to zero + // 14 Shall be set to one + // 13:2 Reserved + // 1 Obsolete + // 0: 1 = There is a minimum Standby time value and it is vendor specific. + // 0 = There is no minimum Standby timer value. + Capabilities [2]uint16 // Word 49..50 + _ [9]uint16 + CapacityLba28 uint32 // Word 60..61 + _ [13]uint16 + QueueDepth uint16 // Word 75, Maximum queue depth – 1 // Serial ATA Capabilities (see 7.12.6.34) // bit 15 Supports READ LOG DMA EXT as equivalent to READ LOG EXT // bit 14 Supports Device Automatic Partial to Slumber transitions @@ -239,15 +264,17 @@ type AtaIdentifyDevice struct { // 10 = the CSEL signal was used. // 11 = some other method was used or the method is unknown. // bit 0 Shall be set to one for PATA devices - ResetResults uint16 // Word 93, Hardware reset results (see 7.12.6.47) - _ [12]uint16 // ... + ResetResults uint16 // Word 93, Hardware reset results (see 7.12.6.47) + _ [6]uint16 // ... + CapacityLba48 uint64 // Word 100..103 + _ [2]uint16 // ... // Physical sector size / logical sector size (see 7.12.6.56) // bit 15 Shall be cleared to zero // bit 14 Shall be set to one // bit 13 Device has multiple logical sectors per physical sector. // bit 12 Device Logical Sector longer than 256 words // bit 11:4 Reserved - // bit 3:0 2X logical sectors per physical sector + // bit 3:0 2^X logical sectors per physical sector LogicalPerPhisicalSectors uint16 // Word 106, Physical sector size / logical sector size (see 7.12.6.56) InterSeekDelay uint16 // Word 107, Inter-seek delay for ISO/IEC 7779 standard acoustic testing (see 7.12.6.57) // In the IDENTIFY DEVICE data (see 7.12.7) and the IDENTIFY PACKET DEVICE data (see 7.13.6): @@ -255,7 +282,9 @@ type AtaIdentifyDevice struct { // bits 11:0 and word 109 bits 15:4 shall contain the IEEE OUI field (see A.11.5.8.2); and // bits 3:0, word 110, and word 111 shall contain the UNIQUE ID field (see A.11.5.8.2). WWNRaw [4]uint16 // Word 108..111, WWN (World Wide Name). - _ [7]uint16 + _ [5]uint16 + // Logical sector size + LogicalSectorSize [2]uint16 // Word 117..118 // Commands and feature sets supported (Continued from words 82..84) (see 7.12.6.40) // bit 15 Shall be cleared to zero // bit 14 Shall be set to one @@ -286,11 +315,17 @@ type AtaIdentifyDevice struct { // bit 1 The Write-Read-Verify feature set is enabled. // bit 0 Obsolete CommandsEnabled4 uint16 // Commands and feature sets supported or enabled (Continued from words 85..87) (see 7.12.6.41) - _ [96]uint16 // ... - RotationRate uint16 // Word 217, nominal media rotation rate. - _ [4]uint16 // ... - TransportMajor uint16 // Word 222, transport major version number. - _ [33]uint16 // ... + _ [88]uint16 // ... + // Alignment of logical sectors within a physical sector (see 7.12.7.75) + // bit 15 Shall be cleared to zero + // bit 14 Shall be set to one + // bits 13:0 Logical sector offset within the first physical sector where the first logical sector is placed + LogicalSectorOffset uint16 // Word 209 + _ [7]uint16 + RotationRate uint16 // Word 217, nominal media rotation rate. + _ [4]uint16 // ... + TransportMajor uint16 // Word 222, transport major version number. + _ [33]uint16 // ... } // 512 bytes func (a *AtaIdentifyDevice) IsGeneralPurposeLoggingCapable() bool { @@ -341,6 +376,54 @@ func fromAtaString(in []byte) string { return string(swapped) } +// Capacity returns size of the device sectors and capacity of the device itself +func (i *AtaIdentifyDevice) Capacity() (sectors, capacity, logicalSectorSize, physicalSectorSize, logicalSectorOffset uint64) { + var lba28, lba48 uint64 + + if i.Capabilities[0]&0x0200 == 0 { + // LBA is not supported + return + } + + lba28 = uint64(i.CapacityLba28) + + if i.CommandsSupported2&0x400 != 0 { + // The 48-bit Address feature set is supported + lba48 = i.CapacityLba48 + } + + if lba28 == 0 && lba48 == 0 { + // capacity unknown (ATAPI CD/DVD) + return + } + + logicalSectorSize = 512 + physicalSectorSize = 512 + + // Long Logical/Physical Sectors (LLS/LPS) ? + if i.LogicalPerPhisicalSectors&0x1000 != 0 { + // Logical sector size is specified in 16-bit words + logicalSectorSize = (uint64(i.LogicalSectorSize[1])<<16 | uint64(i.LogicalSectorSize[0])) << 1 + physicalSectorSize = logicalSectorSize + } + if i.LogicalPerPhisicalSectors&0x2000 != 0 { + // Physical sector size is multiple of logical sector size + physicalSectorSize <<= i.LogicalPerPhisicalSectors & 0x0f + } + logicalSectorOffset = uint64(i.LogicalSectorOffset&0x3fff) * logicalSectorSize + + // Some early 4KiB LLS disks (Samsung N3U-3) return bogus lba28 value + if lba48 >= lba28 || (lba48 != 0 && logicalSectorSize > 512) { + sectors = lba48 + } else { + sectors = lba28 + } + + capacity = sectors * logicalSectorSize + + return +} + //go:generate go run generator/ata_attributes.go const ( @@ -452,6 +535,21 @@ type SataDevice struct { firmwareBug int } +// AtaSmartThresholdEntry individual SMART attribute threshold (12 bytes) +type AtaSmartThresholdEntry struct { + Id uint8 // SMART attribute ID + Threshold uint8 // Threshold value + _ [10]byte // Reserved +} + +// AtaSmartThresholdsPageRaw is page of 30 SMART attributes thresholds as per ATA spec +type AtaSmartThresholdsPageRaw struct { + Revnumber uint16 + ThresholdEntries [30]AtaSmartThresholdEntry + _ [149]byte // Reserved + Chksum byte // Two's complement checksum of first 511 bytes +} + func (d *SataDevice) Type() string { return "sata" } @@ -540,6 +638,13 @@ func findMatchingDbRecord(model, firmware string) (*ataDeviceInfo, error) { return nil, nil } +const ( + // Prefailure bit. If the flag is 0 it corresponds to "Old_age" value, "Pre-fail" otherwise. + AtaAttributeFlagPrefailure = 1 << 0 + // Online bit. If the flag is 0 it corresponds to "Offline" value, "Always" otherwise. + AtaAttributeFlagOnline = 1 << 1 +) + type AtaSmartAttr struct { Id uint8 Flags uint16 @@ -745,3 +850,29 @@ func computeAttributeRawValue(mapping ataDeviceAttr, vendorBytes [6]byte, reserv } return rawValue } + +type AtaSmartThresholdsPage struct { + Revnumber uint16 + Thresholds map[uint8]uint8 +} + +func (d *SataDevice) ReadSMARTThresholds() (*AtaSmartThresholdsPage, error) { + pageRaw, err := d.readSMARTThresholds() + if err != nil { + return nil, err + } + + page := AtaSmartThresholdsPage{} + page.Revnumber = pageRaw.Revnumber + page.Thresholds = make(map[uint8]uint8) + + for _, a := range pageRaw.ThresholdEntries { + if a.Id == 0 { + break + } + + page.Thresholds[a.Id] = a.Threshold + } + + return &page, nil +} diff --git a/vendor/github.com/anatol/smart.go/sata_linux.go b/vendor/github.com/anatol/smart.go/sata_linux.go index bfb6f93f..9c564710 100644 --- a/vendor/github.com/anatol/smart.go/sata_linux.go +++ b/vendor/github.com/anatol/smart.go/sata_linux.go @@ -154,3 +154,39 @@ func (d *SataDevice) ReadSMARTSelfTestLog() (*AtaSmartSelfTestLog, error) { return &log, nil } + +func (d *SataDevice) readSMARTThresholds() (*AtaSmartThresholdsPageRaw, error) { + cdb := cdb16{_SCSI_ATA_PASSTHRU_16} + cdb[1] = 0x08 // ATA protocol (4 << 1, PIO data-in) + cdb[2] = 0x0e // BYT_BLOK = 1, T_LENGTH = 2, T_DIR = 1 + cdb[4] = _SMART_READ_THRESHOLDS // feature LSB + cdb[8] = 0x1 // low lba_low + cdb[10] = 0x4f // low lba_mid + cdb[12] = 0xc2 // low lba_high + cdb[14] = _ATA_SMART // command + + respBuf := make([]byte, 512) + + if err := scsiSendCdb(d.fd, cdb[:], respBuf); err != nil { + return nil, fmt.Errorf("scsiSendCdb SMART READ THRESHOLD: %v", err) + } + + if !checksum(respBuf) { + return nil, fmt.Errorf("invalid checksum for SMART THRESHOLD data") + } + + page := AtaSmartThresholdsPageRaw{} + if err := binary.Read(bytes.NewBuffer(respBuf[:]), binary.LittleEndian, &page); err != nil { + return nil, err + } + + return &page, nil +} + +func checksum(data []byte) bool { + var sum byte + for _, b := range data { + sum += b + } + return sum == 0 +} diff --git a/vendor/github.com/anatol/smart.go/sata_other.go b/vendor/github.com/anatol/smart.go/sata_other.go index 83127195..002c8f4d 100644 --- a/vendor/github.com/anatol/smart.go/sata_other.go +++ b/vendor/github.com/anatol/smart.go/sata_other.go @@ -35,3 +35,7 @@ func (d *SataDevice) ReadSMARTErrorLogSummary() (*AtaSmartErrorLogSummary, error func (d *SataDevice) ReadSMARTSelfTestLog() (*AtaSmartSelfTestLog, error) { return nil, ErrOSUnsupported } + +func (d *SataDevice) readSMARTThresholds() (*AtaSmartThresholdsPageRaw, error) { + return nil, ErrOSUnsupported +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 6554b7ec..9b026ef2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,7 +11,7 @@ github.com/VictoriaMetrics/metrics # github.com/VividCortex/ewma v1.2.0 ## explicit; go 1.12 github.com/VividCortex/ewma -# github.com/anatol/smart.go v0.0.0-20220929205047-336d113af2c1 +# github.com/anatol/smart.go v0.0.0-20240606135530-b987830bbb40 ## explicit; go 1.17 github.com/anatol/smart.go # github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21