Ticket #1471: smartmontools-add-error-rate.patch

File smartmontools-add-error-rate.patch, 2.3 KB (added by Kendy Kutzner, 3 years ago)
  • atacmds.cpp

     
    120120  {"msec24hour32"   , RAWFMT_MSEC24_HOUR32},
    121121  {"tempminmax"     , RAWFMT_TEMPMINMAX},
    122122  {"temp10x"        , RAWFMT_TEMP10X},
     123  {"errorsperops"   , RAWFMT_ERRORS16_PER_OPS32},
    123124};
    124125
    125126const unsigned num_format_names = sizeof(format_names)/sizeof(format_names[0]);
     
    21172118    s = strprintf("%d.%d", word[0]/10, word[0]%10);
    21182119    break;
    21192120
     2121  case RAWFMT_ERRORS16_PER_OPS32:
     2122    // first 16 bits are #errors, last 32 bits are #operations
     2123    s = strprintf("%u (%u ops)", word[2], word[1] << 16 | word[0]);
     2124    break;
     2125
    21202126  default:
    21212127    s = "?"; // Should not happen
    21222128    break;
  • atacmds.h

     
    667667  RAWFMT_MSEC24_HOUR32,
    668668  RAWFMT_TEMPMINMAX,
    669669  RAWFMT_TEMP10X,
     670  RAWFMT_ERRORS16_PER_OPS32,
    670671};
    671672
    672673// Attribute flags
  • drivedb.h

     
    40894089      // ST4000DM004-2CV104/0001 (TRIM: no), ST4000DM005-2DP166/0001, ST8000DM004-2CX188/0001
    40904090    "ST(2000DM00[589]|3000DM007|4000DM00[45]|6000DM003|8000DM004)-.*",
    40914091    "", "",
     4092    "-v 1,errorsperops "
     4093    "-v 7,errorsperops "
     4094    "-v 188,raw16 "
     4095    "-v 195,errorsperops "
    40924096    "-v 200,raw48,Pressure_Limit "
    4093     "-v 188,raw16 -v 240,msec24hour32"
     4097    "-v 240,msec24hour32 "
    40944098  },
    40954099  { "Seagate Desktop HDD.15", // tested with ST4000DM000-1CD168/CC43, ST5000DM000-1FK178/CC44,
    40964100      // ST6000DM001-1XY17Z/CC48
  • smartctl.8.in

     
    17011701.I temp10x
    17021702\- Raw Attribute is ten times the disk temperature in Celsius.
    17031703.Sp
     1704.I errorsperops
     1705\- Raw Attribute contains number of errors in the first 16 bits and
     1706the number of operations in the last 32 bits. This format is used for
     1707error rates (like attributes 1, 7, or 195) by some Seagate drives.
     1708.Sp
    17041709.I raw16(raw16)
    17051710\- Print the raw attribute as a 16-bit value and two optional
    1706171116-bit values if these words are nonzero.  This is the default