Opened 14 years ago

Closed 13 years ago

#109 closed enhancement (fixed)

Print additional attribute flags

Reported by: Christian Franke Owned by: Christian Franke
Priority: minor Milestone: Release 5.41
Component: smartctl Version: 5.39.1
Keywords: Cc: Bruce Allen, jorvang, alex-sh

Description

Parse and print additional Attribute flag meanings (IBM ones, eg performance etc). These are now documented in atacmds.h -- we just need to modify the format of the Attribute table.

(Moved from TODO file r1308, r1676)

Change History (14)

comment:1 by Christian Franke, 14 years ago

Component: allsmartctl

comment:2 by Gabriele Pohl, 14 years ago

Milestone: Release 6.0
Owner: changed from somebody to Gabriele Pohl
Status: newaccepted

comment:3 by Christian Franke, 14 years ago

Cc: Bruce Allen added

Draft for new output format as suggested by Bruce Allen 2006-06-13 ("K" flag name suggested by Steffen Grunewald):

Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            PO----   168   168   021    Pre-fail  Always       -       2566
  4 Start_Stop_Count        -O--CK   100   100   000    Old_age   Always       -       22
  5 Reallocated_Sector_Ct   PO--CK   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         POSR--   200   200   051    Pre-fail  Always       -       0
  9 Power_On_Hours          -O--CK   098   098   000    Old_age   Always       -       1506
 10 Spin_Retry_Count        PO--C-   100   253   051    Pre-fail  Always       -       0
 11 Calibration_Retry_Count -O--C-   100   253   051    Old_age   Always       -       0
 12 Power_Cycle_Count       -O--CK   100   100   000    Old_age   Always       -       22
190 Temperature_Celsius     -O---K   069   022   045    Old_age   Always   In_the_past 31
194 Temperature_Celsius     -O---K   112   065   000    Old_age   Always       -       31
196 Reallocated_Event_Count -O--CK   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  -O--C-   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   ----C-   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    -OSRCK   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   P--R--   200   200   051    Pre-fail  Offline      -       0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

Old format should be left as the default because other tools (GSmartControl, Munim, ...) may rely on it.

comment:4 by Christian Franke, 14 years ago

Related: ticket #158

comment:5 by jorvang, 14 years ago

Cc: jorvang added

comment:6 by alex-sh, 14 years ago

Just for information:
This flag format is accepted by GSmartControl. The flag values are not deciphered though, they are just displayed as strings (like "PO--C-") in the Flags column. I had a file in that format from 2006, so I made sure GSmartControl accepted it. If this format becomes a standard and the description of each flag is clearly described somewhere, I will probably implement better display for them in GSmartControl.
Perhaps some kind of mechanism will be needed to easily detect whether smartctl supports this format or not (to pass the appropriate switch to it), if I'm going to use it by default. I also don't have any objections about changing to this format by default, unless it breaks some other known tools.

comment:7 by alex-sh, 14 years ago

Cc: alex-sh added

comment:8 by Christian Franke, 14 years ago

I would suggest the following enhancement:

Add a new smartctl option -f FORMAT, --format=FORMAT to select output FORMAT:

old: Keep old format. This is the default unless -x, --xall is specified.

brief: Use a new format which fits into 80 columns (implemented for -A, --attributes only). This is the default if -x, --xall is specified.

xml: Reserved for ticket #72 :-)

For the "brief" format replace FLAG hex value by FLAGS as suggested above, remove now redundant columns TYPE (FLAG P) and UPDATED (FLAG O) and shorten WHEN_FAILED. Then output would not exceed 80 columns in most cases.

Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   200   200   051    -    0
  3 Spin_Up_Time            PO----   168   168   021    -    2566
  4 Start_Stop_Count        -O--CK   100   100   000    -    22
  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         POSR--   200   050   051    NOW  281474976710655
  9 Power_On_Hours          -O--CK   098   098   000    -    1506
 10 Spin_Retry_Count        PO--C-   100   253   051    -    0
 11 Calibration_Retry_Count -O--C-   100   253   051    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    22
190 Temperature_Celsius     -O---K   069   022   045    Past 31
194 Temperature_Celsius     -O---K   112   065   000    -    31
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
197 Current_Pending_Sector  -O--C-   200   200   000    -    0
198 Offline_Uncorrectable   ----C-   200   200   000    -    0
199 UDMA_CRC_Error_Count    -OSRCK+  200   200   000    -    0
200 Multi_Zone_Error_Rate   P--R--   200   200   051    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

Change would be simple, I could add this for 5.41 if desired.

comment:9 by Gabriele Pohl, 14 years ago

Owner: changed from Gabriele Pohl to chfranke
Status: acceptedassigned

comment:10 by Gabriele Pohl, 14 years ago

Milestone: Release 6.0Release 5.41

comment:11 by Christian Franke, 14 years ago

Owner: changed from chfranke to Christian Franke
Status: assignedaccepted

comment:12 by alex-sh, 14 years ago

If I'm not mistaken, the Raw value could still overflow the 80 character limit, right? But I guess it's still a lot more readable than the old one.
I have a couple of questions:
What does "+" in "-OSRCK+" mean?

Will the ascii stuff ("
_ K auto-keep", ...) be printed or is it here just for illustration purposes here?

in reply to:  12 comment:13 by Christian Franke, 14 years ago

Replying to alex-sh:

If I'm not mistaken, the Raw value could still overflow the 80 character limit, right?

May happen in rare cases if non-default print format is used. With default decimal format and max 48-bit value line length is 76 chars (see above), with max 64-bit value (Indilinx SSDs) length is 80 chars. Note that some lines may still wrap if pasted to plain text mails because the limit may be 72 chars then (Header line is 70 chars).

I have a couple of questions:
What does "+" in "-OSRCK+" mean?

I suggest to add this if other undocumented bits are set (like "ls -l" mode output if an ACL is present). May never happen in practice.

Will the ascii stuff ("
_ K auto-keep", ...) be printed or is it here just for illustration purposes here?

Should IMO be printed.

comment:14 by Christian Franke, 13 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.