plugins icon indicating copy to clipboard operation
plugins copied to clipboard

os-smart: Add option for extended smart info (smartctl -x)

Open poisonbl opened this issue 11 months ago • 0 comments

This just adds an Extended option to the Services > Smart > Info > Info type list, that passes the -x flag.

There's a fair bit of extra info available for some disks with the -x (long form: -xall) flag. The -a flag equates to:

-H -i -c -A -l error -l selftest -l selective

while the -x flag maps out to:

-H -i -g all -g wcreorder -c -A -f brief -l xerror,error -l xselftest,selftest -l selective -l directory -l scttemp -l scterc -l devstat -l defects -l sataphy

And, incidentally, the output of -a itself ends with The above only provides legacy SMART information - try 'smartctl -x' for more.

In my case, the reason I threw this together, is one useful bit there: -l devstat. That gives this handy block, notably Percentage Used Endurance Indicator for my SSD:

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 1) ==
0x01  0x008  4             107  ---  Lifetime Power-On Resets
0x01  0x010  4           23576  ---  Power-on Hours
0x01  0x018  6     26883660008  ---  Logical Sectors Written
0x01  0x020  6       353564574  ---  Number of Write Commands
0x01  0x028  6       263106397  ---  Logical Sectors Read
0x01  0x030  6         7907983  ---  Number of Read Commands
0x01  0x038  6     84867629087  ---  Date and Time TimeStamp
0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
0x04  0x010  4               0  ---  Resets Between Cmd Acceptance and Completion
0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
0x06  0x008  4             358  ---  Number of Hardware Resets
0x06  0x018  4               0  ---  Number of Interface CRC Errors
0x07  =====  =               =  ===  == Solid State Device Statistics (rev 1) ==
0x07  0x008  1              11  ---  Percentage Used Endurance Indicator
                                |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

All in all a fairly trivial change, and it looks like "Extended" is already represented in at least the Spanish translation (I didn't check others).

Closes #4546

poisonbl avatar Jan 29 '25 12:01 poisonbl