truenas / py-SMART

Wrapper for smartctl (smartmontools)
GNU Lesser General Public License v2.1
79 stars 35 forks source link

Some drives are missing device vendor field #58

Closed ulmitov closed 1 year ago

ulmitov commented 1 year ago

Hi,

When device vendor field is missing in the info, can it be taken from model family's first word ?

Examples:

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.4.0-99-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Intel S4510/S4610/S4500/S4600 Series SSDs
Device Model:     INTEL SSDSC2KB019T8
Serial Number:    PHYF129104Y21P9DGN
LU WWN Device Id: 5 5cd2e4 1536beca6
Firmware Version: XCV10132
User Capacity:    1 920 383 410 176 bytes [1,92 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.4.0-99-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Micron 5100 Pro / 52x0 / 5300 SSDs
Device Model:     Micron_5300_MTFDDAK480TDS
Serial Number:    22053475E0F9
LU WWN Device Id: 5 00a075 13475e0f9
Firmware Version: D3MU001
User Capacity:    480 103 981 056 bytes [480 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
ralequi commented 1 year ago

seems ok to me

ralequi commented 1 year ago

Done, reopen if you found any issue

ralequi commented 1 year ago

Thanks for your contributions as always!