Testers: New inxi/pinxi feature: -Da now uses smartctl data

I'll try it later and edit this post with the result when I have the UPS and connected desktop on, I have a couple of refurbished My Books (older style) I got from the WD Outlet site so it will be interesting to see what is in them. Probably Blue as well but you never know.

Output:

sudo pinxi -Dazy80
Drives:
  Local Storage: total: 3.14 TiB used: 777.66 GiB (24.2%) 
  ID-1: /dev/sda vendor: Crucial model: CT500MX500SSD1 family: MX500 SSDs 
  size: 419.19 GiB block size: physical: 4096 B logical: 512 B sata: 3.3 
  speed: 6.0 Gb/s serial: <filter> rev: 023 temp: 29 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 68d 18h cycles: 1280 
  written: 4.67 TiB Old-Age: UDMA CRC errors: 47 
  ID-2: /dev/sdf type: USB vendor: Western Digital model: WD My Book 25DA 
  drive model: WD20EZRZ-00Z5HB0 family: Blue size: 1.82 TiB block size: 
  physical: 4096 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s rotation: 5400 rpm 
  serial: <filter> drive serial: <filter> rev: 3002 drive rev: 80.00A80 
  temp: 24 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 70 hrs cycles: 85 
  ID-3: /dev/sdg type: USB vendor: Toshiba model: DT01ACA050 size: 465.76 GiB 
  block size: physical: 512 B logical: 512 B serial: <filter> rev: MS1O 
  scheme: MBR 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
  ID-4: /dev/sdh type: USB vendor: Toshiba model: DT01ACA050 size: 465.76 GiB 
  block size: physical: 512 B logical: 512 B serial: <filter> rev: MS1O 
  scheme: MBR 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 

The unsupported enclosure is an old Buffalo Duo. The Toshiba drives were replacements for the original Samsung ones. As suspected in the WD My Book I too have Blue drives. The SSD is a few years old so no surprises for that reading either but I still have a good 176TiB before it dies (under the 5 year warranty terms if it happens sooner I get a replacement) :wink:

1 Like

I tested on old MacBook Air using Void:

sudo pinxi -Dazy80                                                                                                           ✔  253  11:35:53
Password: 
Drives:
  Local Storage: total: 233.76 GiB used: 18.35 GiB (7.9%) 
  ID-1: /dev/sda vendor: Apple model: SSD TS256C family: based SSDs 
  size: 233.76 GiB block size: physical: 512 B logical: 512 B sata: 2.6 
  speed: 3.0 Gb/s serial: <filter> rev: 0201 temp: 41 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 249d 4h cycles: 14119

Tried on main machine: Innostor is external drive. Did not know it was a Toshiba drive model.


Drives:
  Local Storage: total: 1.71 TiB used: 83.10 GiB (4.7%) 
  ID-1: /dev/sda vendor: Western Digital model: WD6401AALS-00L3B2 
  family: Caviar Black size: 596.17 GiB block size: physical: 512 B 
  logical: 512 B sata: 2.5 speed: 3.0 Gb/s serial: <filter> rev: 3B01 
  temp: 25 C scheme: MBR 
  SMART: yes state: enabled health: PASSED on: 3y 224d 2h cycles: 4865 
  ID-2: /dev/sdb vendor: Kingston model: SV300S37A240G size: 223.57 GiB 
  block size: physical: 512 B logical: 512 B sata: 3.0 speed: 3.0 Gb/s 
  serial: <filter> rev: BBF0 temp: 22 C scheme: MBR 
  SMART: yes state: enabled health: PASSED on: 7 hrs cycles: 7 read: 14 GiB 
  written: 8 GiB 
  ID-3: /dev/sdc type: USB vendor: Innostor model: Ext. HDD 
  drive vendor: Toshiba drive model: MQ01ABD100 family: 2.5" HDD MQ01ABD... 
  size: 931.51 GiB block size: physical: 4096 B logical: 512 B sata: 2.6 
  speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> drive serial: <filter> 
  rev: AX001U scheme: MBR 
  SMART: yes state: disabled 
:: 11:54 » root on john-pc at {/usr/local/bin}
1 Like

johnvan54, this was the reason I finally got around to starting this feature, wanting to know what's inside the enclosure as part of inxi functionality. Then the variations in meaning and interpretation became obvious for other features, but that's totally normal for all such data that is generated by vendors.

Note that a few other data bits appear as well, SATA level, which I like, like 2.6, the drive vendor|family|model|rev group of values, if found, for external disks. Also, for external, linux will report 512 logical/physical for external almost always, but now it shows the actual values, like 512 logical/4096 physical, or whatever. That was unexpected.

None of my IDE drives worked, so I don't have much direct data on them, the feature does work for them, but I don't have many data examples for them. NVME I think is working fine, though there may be as of yet unhandled nvme specific alerts that are not handled. Note that most drives except nvme/m2 report their attribute values in table form, 9 columns, but nvme just retains the key/value pair : separated values of the info block all the way down, so some of those require special handling to reconnect the value/threshold etc. So far the nvme --dbg 12 raw data results seem quite consistent so that's encouraging.

If in doubt, post: sudo pinxi -Dazy80 --dbg 12 and that lets me see easily if there is any raw smartctl data that inxi should have shown but didn't.

This is particularly valuable for any drive that shows warning signs, Pre-fail numbers entering danger range, or actually FAILED reported, that one is especially desirable so I can see what numbers trigger that, but also when numbers are approaching the threshold but not at it yet, which is a true pre-fail condition.

Thanks for testing so far.

because of the OLD AGE message on my SSD, here's the debug. I'm not concerned, it's had buggy SMART data from day one and I've been working with Micron developers to suppress some of the messages in Linux. Obviously not everything can be turned off because it works fine in Windows with their own utility and wouldn't otherwise. The fairly low CRC error for example, I am not concerned by this since it's always had that for as long as I can remember. The drive reads and writes just fine, it may be a quirk of the Athlon 5350's storage controller rather than the drive itself.

sudo pinxi -Dazy80 --dbg 12
Drive:/dev/sda:
$VAR1 = [
          'Model Family:     Crucial/Micron MX500 SSDs',
          'Device Model:     CT500MX500SSD1',
          'Serial Number:    1809E13xxxxx',
          'LU WWN Device Id: 5 00a075 1e130d990',
          'Firmware Version: M3CR023',
          'User Capacity:    450,097,074,176 bytes [450 GB]',
          'Sector Sizes:     512 bytes logical, 4096 bytes physical',
          'Rotation Rate:    Solid State Device',
          'Form Factor:      2.5 inches',
          'Device is:        In smartctl database [for details use: -P show]',
          'ATA Version is:   ACS-3 T13/2161-D revision 5',
          'SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)',
          'Local Time is:    Sun Jan 19 20:51:38 2020 GMT',
          'SMART support is: Available - device has SMART capability.',
          'SMART support is: Enabled',
          'SMART overall-health self-assessment test result: PASSED',
          '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   100   100   000    Pre-fail  Always       -       0',
          '5 Reallocate_NAND_Blk_Cnt 0x0032   100   100   010    Old_age   Always       -       0',
          '9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       1650',
          '12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1282',
          '171 Program_Fail_Count      0x0032   100   100   000    Old_age   Always       -       0',
          '172 Erase_Fail_Count        0x0032   100   100   000    Old_age   Always       -       0',
          '173 Ave_Block-Erase_Count   0x0032   098   098   000    Old_age   Always       -       33',
          '174 Unexpect_Power_Loss_Ct  0x0032   100   100   000    Old_age   Always       -       46',
          '180 Unused_Reserve_NAND_Blk 0x0033   000   000   000    Pre-fail  Always       -       46',
          '183 SATA_Interfac_Downshift 0x0032   100   100   000    Old_age   Always       -       8',
          '184 Error_Correction_Count  0x0032   100   100   000    Old_age   Always       -       0',
          '187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0',
          '194 Temperature_Celsius     0x0022   071   040   000    Old_age   Always       -       29 (Min/Max 0/60)',
          '196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0',
          '197 Bogus_Current_Pend_Sect 0x0032   100   100   000    Old_age   Always       -       1',
          '198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0',
          '199 UDMA_CRC_Error_Count    0x0032   100   100   000    Old_age   Always       -       47',
          '202 Percent_Lifetime_Remain 0x0030   098   098   001    Old_age   Offline      -       2',
          '206 Write_Error_Rate        0x000e   100   100   000    Old_age   Always       -       0',
          '210 Success_RAIN_Recov_Cnt  0x0032   100   100   000    Old_age   Always       -       0',
          '246 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       10025594258',
          '247 Host_Program_Page_Count 0x0032   100   100   000    Old_age   Always       -       167520829',
          '248 FTL_Program_Page_Count  0x0032   100   100   000    Old_age   Always       -       89697990'
        ];
Drives:
  Local Storage: total: 419.19 GiB used: 82.57 GiB (19.7%) 
  ID-1: /dev/sda vendor: Crucial model: CT500MX500SSD1 family: MX500 SSDs 
  size: 419.19 GiB block size: physical: 4096 B logical: 512 B sata: 3.3 
  speed: 6.0 Gb/s serial: <filter> rev: 023 temp: 29 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 68d 18h cycles: 1282 
  written: 4.67 TiB Old-Age: UDMA CRC errors: 47 

UDMA_CRC_Error_Count is one of the values I've been consistently upping the min value to report on. Note that Old_age values seem much less reliable than Pre-fail values. I only use a few of the Old_age items because of that, and expect to up the minimum numbers there until they reach something that is reasonably useful on a consistent basis.

One area I'm having difficultly deciding or learning what to do is when THRESH is 000, that's a tricky one to handle, in some cases, VALUE will approach 0, and the closer it gets, the closer the drive is to death, but in most cases, THRESH is a number, and when VALUE approaches it, the drive is approaching failure.

So the puzzle is when pinxi should show users info, and when to suppress it.

1 Like

Which is why micron's firmware is such a pain in the backside for opensource developers like yourself unfortunately. They must use some proprietary scheme that is not read 100% properly by anything other than their own program still. I did advise them against and the latest firmware goes some way to addressing that but...

Should the values actually be representative any time soon and the excrement hit the fan, I have backups of course but a lot of people wouldn't necessarily bother with that until after they learnt the hard way.

Lifetime remain is correctly read :man_shrugging:, not much else above makes sense. there are no bad sectors, I have hard set a 10% overprovision which is why the user capacity reported is wrong.

~/.bin >>> sudo ./pinxi -Dazy80                                                             
Drives:
  Local Storage: total: 704.25 GiB used: 237.93 GiB (33.8%) 
  ID-1: /dev/sda vendor: Kingston model: RBU-SNS8100S3128GD size: 119.24 GiB 
  block size: physical: 512 B logical: 512 B sata: 3.2 speed: 6.0 Gb/s 
  serial: <filter> rev: 06.9 scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 54d 20h cycles: 3196 
  read: 3.6 MiB written: 2.5 MiB Old-Age: media wearout: 100 Pre-Fail: 
  spin-up time: 100 threshold: 50 
  ID-2: /dev/sdb vendor: Seagate model: ST500LM012 HN-M500MBB 
  family: SpinPoint M8 (AF) size: 465.76 GiB block size: physical: 4096 B 
  logical: 512 B sata: 3.0 speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: 0002 temp: 26 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 341d 23h cycles: 3692 
  Pre-Fail: spin-up time: 91 threshold: 25 
  ID-3: /dev/sdc vendor: Samsung model: MZHPU128HCGM-00004 size: 119.24 GiB 
  block size: physical: 512 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s 
  serial: <filter> rev: 501Q scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 184d 2h cycles: 5046 

The output makes sense to me, no unexpected values.

An unrelated feature request: Can you make --no-host the default in inxi? Because hostnames can be funny or a private information some way or another.

two more external drives for you. one is in an 2.5" Aluminium ICY BOX USB3 enclosure*, The other connected over SATA port inside a CiT USB 2.0 PATA/SATA enclosure**. Both connected to USB 2.0 for the purposes of this output.

*the original drive from my laptop which I replaced with an SSD (ID-3)
** the remaining working original drive from the Buffalo Duo RAID enclosure (ID-2)

  ID-2: /dev/sdf type: USB vendor: Samsung model: HD501LJ 
  family: SpinPoint T166 size: 465.76 GiB block size: physical: 512 B 
  logical: 512 B sata: 2.5 speed: 3.0 Gb/s serial: <filter> rev: CR100-11 
  temp: 17 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 33d 20h cycles: 804 
  ID-3: /dev/sdg type: USB vendor: JMicron Tech model: Generic 
  drive vendor: Western Digital drive model: WD5000LPVX-16V0TT3 family: Blue 
  size: 465.76 GiB block size: physical: 4096 B logical: 512 B sata: 3.0 
  speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> drive serial: <filter> 
  rev: 0114 drive rev: 02.01A02 temp: 23 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 76d 8h cycles: 916 

Making that the default wouldn't make sense, but it has in the past struck me that --no-host could be triggered by -z along with the other items that are hidden. But --host would still have to override it in case you wanted to show that.

1 Like

That looks like unexpected units were used for read/write, unless you've literally never used the drive for anything. Can you show the --dbg 12 smartctl for that? I had a similar issue with Intel SSD, which uses LBA in a different way than other SSDs use. Read / write is another slightly tricky one due to odd differences.

I'm also going to change type: USB to ext: USB because I want type: for SSD/Spinning/NVME

I added a SDHC card reader with a card in it. Otherwise the same.

~/.bin >>> sudo ./pinxi -Dazy80 --dbg 12                                                                                
Drive:/dev/sda:
$VAR1 = [
          'Device Model:     KINGSTON RBU-SNS8100S3128GD',
          'Serial Number:    50026B7248042CC6',
          'Firmware Version: S8FM06.9',
          'User Capacity:    128,035,676,160 bytes [128 GB]',
          'Sector Size:      512 bytes logical/physical',
          'Rotation Rate:    Solid State Device',
          'Form Factor:      < 1.8 inches',
          'Device is:        Not in smartctl database [for details use: -P showall]',
          'ATA Version is:   ATA8-ACS (minor revision not indicated)',
          'SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)',
          'Local Time is:    Mon Jan 20 01:39:05 2020 CET',
          'SMART support is: Available - device has SMART capability.',
          'SMART support is: Enabled',
          'SMART overall-health self-assessment test result: PASSED',
          '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     0x000b   100   100   050    Pre-fail  Always       -       0',
          '2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0',
          '3 Spin_Up_Time            0x0007   100   100   050    Pre-fail  Always       -       0',
          '5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0',
          '7 Unknown_SSD_Attribute   0x000b   100   100   050    Pre-fail  Always       -       0',
          '8 Unknown_SSD_Attribute   0x0005   100   100   050    Pre-fail  Offline      -       0',
          '9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       10077',
          '10 Unknown_SSD_Attribute   0x0013   100   100   050    Pre-fail  Always       -       0',
          '12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       3196',
          '168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       4',
          '170 Unknown_Attribute       0x0003   100   100   010    Pre-fail  Always       -       287',
          '173 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       4325454',
          '175 Program_Fail_Count_Chip 0x0012   100   100   010    Old_age   Always       -       0',
          '187 Reported_Uncorrect      0x0012   100   100   000    Old_age   Always       -       0',
          '192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       81',
          '196 Reallocated_Event_Count 0x0002   100   100   000    Old_age   Always       -       0',
          '197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0',
          '199 UDMA_CRC_Error_Count    0x000b   100   100   050    Pre-fail  Always       -       4',
          '218 Unknown_Attribute       0x000b   100   100   050    Pre-fail  Always       -       4',
          '233 Media_Wearout_Indicator 0x000b   100   100   000    Pre-fail  Always       -       5083',
          '240 Unknown_SSD_Attribute   0x0013   100   100   050    Pre-fail  Always       -       0',
          '241 Total_LBAs_Written      0x0012   100   100   000    Old_age   Always       -       5027',
          '242 Total_LBAs_Read         0x0012   100   100   000    Old_age   Always       -       7340',
          '244 Unknown_Attribute       0x0002   100   100   050    Old_age   Always       -       66',
          '245 Unknown_Attribute       0x0002   100   100   050    Old_age   Always       -       78',
          '246 Unknown_Attribute       0x0002   100   100   050    Old_age   Always       -       2669008'
        ];
Drive:/dev/sdc:
$VAR1 = [
          'Device Model:     SAMSUNG MZHPU128HCGM-00004',
          'Serial Number:    S1NBNYAFB00246',
          'LU WWN Device Id: 5 002538 6000491a9',
          'Firmware Version: UXM6501Q',
          'User Capacity:    128,035,676,160 bytes [128 GB]',
          'Sector Size:      512 bytes logical/physical',
          'Rotation Rate:    Solid State Device',
          'Device is:        Not in smartctl database [for details use: -P showall]',
          'ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c',
          'SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)',
          'Local Time is:    Mon Jan 20 01:39:05 2020 CET',
          'SMART support is: Available - device has SMART capability.',
          'SMART support is: Enabled',
          'SMART overall-health self-assessment test result: PASSED',
          'SMART Attributes Data Structure revision number: 1',
          'Vendor Specific SMART Attributes with Thresholds:',
          'ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE',
          '9 Power_On_Hours          0x0032   097   097   000    Old_age   Always       -       13179',
          '12 Power_Cycle_Count       0x0032   095   095   000    Old_age   Always       -       5046',
          '177 Wear_Leveling_Count     0x0013   092   092   017    Pre-fail  Always       -       277',
          '178 Used_Rsvd_Blk_Cnt_Chip  0x0013   086   086   010    Pre-fail  Always       -       177',
          '179 Used_Rsvd_Blk_Cnt_Tot   0x0013   087   087   010    Pre-fail  Always       -       319',
          '180 Unused_Rsvd_Blk_Cnt_Tot 0x0013   087   087   010    Pre-fail  Always       -       2305',
          '183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0'
        ];
Drive:/dev/sdb:
$VAR1 = [
          'Model Family:     Seagate Samsung SpinPoint M8 (AF)',
          'Device Model:     ST500LM012 HN-M500MBB',
          'Serial Number:    S2R7J9EF300175',
          'LU WWN Device Id: 5 0004cf 20cd6d085',
          'Firmware Version: 2AR10002',
          'User Capacity:    500,107,862,016 bytes [500 GB]',
          'Sector Sizes:     512 bytes logical, 4096 bytes physical',
          'Rotation Rate:    5400 rpm',
          'Form Factor:      2.5 inches',
          'Device is:        In smartctl database [for details use: -P show]',
          'ATA Version is:   ATA8-ACS T13/1699-D revision 6',
          'SATA Version is:  SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)',
          'Local Time is:    Mon Jan 20 01:39:06 2020 CET',
          'SMART support is: Available - device has SMART capability.',
          'SMART support is: Enabled',
          'SMART overall-health self-assessment test result: PASSED',
          '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   100   100   051    Pre-fail  Always       -       20',
          '2 Throughput_Performance  0x0026   252   252   000    Old_age   Always       -       0',
          '3 Spin_Up_Time            0x0023   091   076   025    Pre-fail  Always       -       2859',
          '4 Start_Stop_Count        0x0032   097   097   000    Old_age   Always       -       3628',
          '5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0',
          '7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0',
          '8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0',
          '9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       16968',
          '10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0',
          '11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       35',
          '12 Power_Cycle_Count       0x0032   097   097   000    Old_age   Always       -       3692',
          '191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       23',
          '192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0',
          '194 Temperature_Celsius     0x0002   064   057   000    Old_age   Always       -       26 (Min/Max 17/45)',
          '195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0',
          '196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0',
          '197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0',
          '198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0',
          '199 UDMA_CRC_Error_Count    0x0036   200   200   000    Old_age   Always       -       0',
          '200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       3508',
          '223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       35',
          '225 Load_Cycle_Count        0x0032   068   068   000    Old_age   Always       -       331141'
        ];
Drive:/dev/sdd:
$VAR1 = [
          '/dev/sdd: Unknown USB bridge [0x090c:0x6000 (0x100)]',
          'Please specify device type with the -d option.',
          'Use smartctl -h to get a usage summary'
        ];
Drives:
  Local Storage: total: 711.75 GiB used: 310.16 GiB (43.6%) 
  ID-1: /dev/sda vendor: Kingston model: RBU-SNS8100S3128GD size: 119.24 GiB 
  block size: physical: 512 B logical: 512 B sata: 3.2 speed: 6.0 Gb/s 
  serial: <filter> rev: 06.9 scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 54d 21h cycles: 3196 
  read: 3.6 MiB written: 2.5 MiB Old-Age: media wearout: 100 Pre-Fail: 
  spin-up time: 100 threshold: 50 
  ID-2: /dev/sdb vendor: Seagate model: ST500LM012 HN-M500MBB 
  family: SpinPoint M8 (AF) size: 465.76 GiB block size: physical: 4096 B 
  logical: 512 B sata: 3.0 speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: 0002 temp: 26 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 342d 0h cycles: 3692 
  Pre-Fail: spin-up time: 91 threshold: 25 
  ID-3: /dev/sdc vendor: Samsung model: MZHPU128HCGM-00004 size: 119.24 GiB 
  block size: physical: 512 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s 
  serial: <filter> rev: 501Q scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 184d 3h cycles: 5046 
  ID-4: /dev/sdd type: USB vendor: Generic model: USB2.0 Card Reader 
  size: 7.50 GiB block size: physical: 512 B logical: 512 B serial: <filter> 
  rev: 6000 scheme: GPT 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 

pinxi 3.0.37-33 now has slightly different behavior:

  1. for standard use, host shows as expected, unless you set your configurations to not show it by default.
  2. For -z, it will not show, unless you override it with -Z or --host or in configs.
  3. With -Z it will show if not blocked in configs or with --no-host.
  4. In cases where host was set in configs, -z /-Z don't change anything, --no-host/--host always override everything. I'm not handling cases of use where someone uses --host and --no-host because that's silly.

I think I got this logic right, the goal is where people used config value to turn off host, it will continue to turn it off unless overridden by --host. If the person turned it on for some reason, which would make little sense, then only --no-host can turn it off.

This achieves the desired effect of not showing host when -z is used, without changing default behaviors for non public use of inxi/pinxi.

Basically the internal defaults are reversed, from always showing unless conditions are met, to never showing unless conditions are met.

2 Likes

eugen-b, it looks to me like the Kingston /dev/sda drive has the same issue as Intel SSDs, Intel LBAs appear to refer to 32MiB units, not blocksize x LBA count which is what most other SSDs seem to do. I'd only seen reference to Intel in this sense, wish I could see more Kingston SSD outputs to know if this is a general Kingston thing or drive specific. Searching a bit it appears that kingston units for LBA are 1 GB, sigh. I've updated to handle the intel and kingston variations. What' sad is there is already a specific Attribute that lists 1 GB sizes, and another that lists 32MB block size counts, so it's unclear why they just jammed their data into the wrong field name with the wrong values when it would have taken them no effort to just follow the rules.

What's worse when trying to support what are essentially errors by the vendors, it's also fairly likely some bright lad will one day fix those errors, which would then make the inxi results wrong. But that's basically a constant with all vendor supplied data, so that is what it is in the computing world.

Hopefully I don't find too many vendors who decided to use random values in these fields or I may have to just revert to showing the raw counts and telling users to look it up themselves, though that's a pain. But one can't help noting the near pathological unwillingness or inability of vendors to actually try to report real data in a sensible way that follows whatever rules they agree on.

1 Like

One last drive to test:

Drives:
  Local Storage: total: 111.79 GiB used: 38.71 GiB (34.6%) 
  ID-1: /dev/sda model: oyunkey size: 111.79 GiB block size: physical: 512 B 
  logical: 512 B sata: 3.2 speed: 3.0 Gb/s serial: <filter> rev: 3A0 
  temp: 40 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 7d 5h cycles: 449 
  read: 11.8 MiB written: 10.6 MiB

johnvan54
Can you show this with --dbg 12 output, the read/written is clearly wrong, and the vendor was not detected.

Sorry, for the delay:

Drive:/dev/sda:
$VAR1 = [
          'Device Model:     oyunkey',
          'Serial Number:    08162218X0039',
          'Firmware Version: R0423A0',
          'User Capacity:    120,034,123,776 bytes [120 GB]',
          'Sector Size:      512 bytes logical/physical',
          'Rotation Rate:    Solid State Device',
          'Form Factor:      2.5 inches',
          'Device is:        Not in smartctl database [for details use: -P showall]',
          'ATA Version is:   ACS-2 T13/2015-D revision 3',
          'SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)',
          'Local Time is:    Tue Jan 21 21:13:02 2020 EST',
          'SMART support is: Available - device has SMART capability.',
          'SMART support is: Enabled',
          'SMART overall-health self-assessment test result: PASSED',
          'SMART Attributes Data Structure revision number: 1',
          'Vendor Specific SMART Attributes with Thresholds:',
          'ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE',
          '1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0',
          '5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       0',
          '9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       173',
          '12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       450',
          '160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       0',
          '161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       100',
          '163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       47',
          '164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       11365',
          '165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       34',
          '166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       6',
          '167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       22',
          '168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       7000',
          '169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       100',
          '175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0',
          '176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0',
          '177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0',
          '178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       0',
          '181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0',
          '182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0',
          '192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       34',
          '194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       40',
          '195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       38464',
          '196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       0',
          '197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       0',
          '198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       0',
          '232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       100',
          '241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       21703',
          '242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       24294',
          '245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       33275'
        ];
Drives:
  Local Storage: total: 111.79 GiB used: 38.60 GiB (34.5%) 
  ID-1: /dev/sda model: oyunkey size: 111.79 GiB block size: physical: 512 B 
  logical: 512 B sata: 3.2 speed: 3.0 Gb/s serial: <filter> rev: 3A0 
  temp: 40 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 7d 5h cycles: 450 
  read: 11.9 MiB written: 10.6 MiB 

SSD drive made by OYUNKEY. EPro-120GB

Great thanks. Added oyunkey to the vendor list inxi uses internally, another chinese one, there are so many. I'm not sure how to handle the use of I believe 32MiB units in the Total_LBAs_Written/Read items, I believe that's what they are using, like Intel, not GiB, like kingston. I have to admit I am puzzled why they use the wrong field when the right fields exist, that seems like an odd decision, not surprising when smaller companies do it, but certainly so when large ones like Intel or Kingston do it.

I've debated trying to make inxi guess the right units, or rather, the wrong units, and then apply them, but that's something that could only crudely work. It's obvious when reads/writes are in single digit MiB that they used the wrong units in there, but it's less obvious what tests or conclusions inxi should draw from that, I mean, it could be a new drive for instance, so it's really difficult to make some clever rules there that would be right more often than wrong, for example, if it's single digit read/writes in MiB, that's almost certainly wrong in most cases.. maybe I could do what I do for RAM, which has similarly flawed vendor data to deal with, which is to just add a note after suspect items to check it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by