Thema: Delphi S.M.A.R.T - IDE Details

Einzelnen Beitrag anzeigen

Muetze1
(Gast)

n/a Beiträge
 
#9

Re: S.M.A.R.T - IDE Details

  Alt 16. Feb 2008, 15:22
Zitat von Metal_Snake2:
Mit der nicht vollständigen Tabelle meine ich sowas hier klack
Die SMART Tabelle bzw. die Identifier die die Festplatten zurück liefern sind herstellerspezifisch und leider kocht auch jeder Hersteller seine eigene Suppe. Zum Teil haben sich diese Definitionen zwischen den Modellserien beim gleichen Hersteller verändert. Es ist so, dass die meisten (nicht alle, nicht vollständig) ein paar IDs gleich belegen. Aber schon bei der Laufwerkstemperatur gibt es Unterschiede (Grad, eigene Einheiten, etc).

Delphi-Quellcode:
//
//---------------------------------------------------------------------
// Valid Attribute IDs
//---------------------------------------------------------------------
Const
  ATTR_INVALID = 0;
  ATTR_READ_ERROR_RATE = 1;
  ATTR_THROUGHPUT_PERF = 2;
  ATTR_SPIN_UP_TIME = 3;
  ATTR_START_STOP_COUNT = 4;
  ATTR_REALLOC_SECTOR_COUNT = 5;
  ATTR_READ_CHANNEL_MARGIN = 6;
  ATTR_SEEK_ERROR_RATE = 7;
  ATTR_SEEK_TIME_PERF = 8;
  ATTR_POWER_ON_HRS_COUNT = 9;
  ATTR_SPIN_RETRY_COUNT = 10;
  ATTR_CALIBRATION_RETRY_COUNT = 11;
  ATTR_POWER_CYCLE_COUNT = 12;
  ATTR_EMERGENCY_RETRACT_CYCLE = 192 ; // C0
  ATTR_LOAD_CYCLE_COUNT = 193 ; // C1
  ATTR_TEMPERATURE_CELCIUS = 194 ; // C2
  ATTR_HARDWARE_ECC = 195 ; // C3
  ATTR_REALLOCATION_EVENT_COUNT = 196 ; // C4
  ATTR_CURRENT_PENDING_SECTOR = 197 ; // C5
  ATTR_OFF_LINE_UNCORRECTABLE = 198 ; // C6
  ATTR_ULTRA_ATA_CRC_ERROR_RATE = 199 ; // C7
  ATTR_MULTI_ZONE_ERROR_RATE = 200 ; // C8
  ATTR_SOFT_READ_ERROR_RATE = 201 ; // C9
  ATTR_OFF_TRACK_ERRORS = 201 ; // C9 - alternative Maxtor
  ATTR_TA_INCREASE_COUNT = 202 ; // CA
  ATTR_RUN_OUT_CANCEL = 203 ; // CB
  ATTR_ECC_ERRORS = 203 ; // CB - alternative Maxtor
  ATTR_SHOCK_COUNT_WRITE_OPS = 204 ; // CC
  ATTR_SHOCK_RATE_WRITE_OPS = 205 ; // CD
  ATTR_SPIN_HIGH_CURRENT = 207 ; // CE
  ATTR_SPIN_BUZZ = 208 ; // CF
  ATTR_OFFLINE_SEEK_PERF = 209 ; // D0

// Declare a global structure to help print the data.
// NOTE: Per ATA3 and ATA4 specs, these attribute definitions are defined by the drive vendor
// and hence their attributes may vary between vendors.
//
Type
  TAttrEntry = Record
    ID: Byte;
    Name: String;
  End;
Const
  coAttrNames : Array[0..31] Of TAttrEntry = (
                 ({00}ID: ATTR_INVALID; Name: 'No Attribute Here'),
                 ({01}ID: ATTR_READ_ERROR_RATE; Name: 'Raw Read Error Rate'),
                 ({02}ID: ATTR_THROUGHPUT_PERF; Name: 'Throughput Performance'),
                 ({03}ID: ATTR_SPIN_UP_TIME; Name: 'Spin Up Time'),
                 ({04}ID: ATTR_START_STOP_COUNT; Name: 'Start/Stop Count'),
                 ({05}ID: ATTR_REALLOC_SECTOR_COUNT; Name: 'Reallocated Sector Count'),
                 ({06}ID: ATTR_READ_CHANNEL_MARGIN; Name: 'Read Channel Margin'),
                 ({07}ID: ATTR_SEEK_ERROR_RATE; Name: 'Seek Error Rate'),
                 ({08}ID: ATTR_SEEK_TIME_PERF; Name: 'Seek Time Performance'),
                 ({09}ID: ATTR_POWER_ON_HRS_COUNT; Name: 'Power On Hours Count'),
                 ({10}ID: ATTR_SPIN_RETRY_COUNT; Name: 'Spin Retry Count'),
                 ({11}ID: ATTR_CALIBRATION_RETRY_COUNT; Name: 'Calibration Retry Count'),
                 ({12}ID: ATTR_POWER_CYCLE_COUNT; Name: 'Power Cycle Count'),
                 ({13}ID: ATTR_EMERGENCY_RETRACT_CYCLE; Name: 'Emergency Retract Cycle'),
                 ({14}ID: ATTR_LOAD_CYCLE_COUNT; Name: 'Load Cycle Count'),
                 ({15}ID: ATTR_TEMPERATURE_CELCIUS; Name: 'Temperature Celcius'),
                 ({16}ID: ATTR_HARDWARE_ECC; Name: 'Hardware ECC'),
                 ({17}ID: ATTR_REALLOCATION_EVENT_COUNT; Name: 'Reallocation Event Count'),
                 ({18}ID: ATTR_CURRENT_PENDING_SECTOR; Name: 'Current Pending Sector'),
                 ({19}ID: ATTR_OFF_LINE_UNCORRECTABLE; Name: 'Off Line Uncorrectable'),
                 ({20}ID: ATTR_ULTRA_ATA_CRC_ERROR_RATE; Name: 'UltraATA CRC Error Rate'),
                 ({21}ID: ATTR_MULTI_ZONE_ERROR_RATE; Name: 'Multi Zone Error Rate'),
                 ({22}ID: ATTR_SOFT_READ_ERROR_RATE; Name: 'Soft Read Error Rate'),
                 ({23}ID: ATTR_OFF_TRACK_ERRORS; Name: 'Off Track Errors'),
                 ({24}ID: ATTR_TA_INCREASE_COUNT; Name: 'TA Increase Count'),
                 ({25}ID: ATTR_RUN_OUT_CANCEL; Name: 'Run Out Cancel'),
                 ({26}ID: ATTR_ECC_ERRORS; Name: 'ECC Errors'),
                 ({27}ID: ATTR_SHOCK_COUNT_WRITE_OPS; Name: 'Shock Count Write Operations'),
                 ({28}ID: ATTR_SHOCK_RATE_WRITE_OPS; Name: 'Shock Rate Write Operations'),
                 ({29}ID: ATTR_SPIN_HIGH_CURRENT; Name: 'Spin High Current'),
                 ({30}ID: ATTR_SPIN_BUZZ; Name: 'Spin Buzz'),
                 ({31}ID: ATTR_OFFLINE_SEEK_PERF; Name: 'Offline Seek Performance') );
Beachte den Kommentar zuvor. Wenn du das im Detail haben willst, dann schau bei den Quellen der Linux smartmontools vorbei/rein.

Zitat von Metal_Snake2:
@Muetze1
absulut richtig was du da erzählst, genach das werde ich tuhn!!
Beachte, dass z.B. beim Schreiben eines Sektors er die Daten dann erwartet und da diese Zugriffe meistens asynchron arbeiten, kann dir Windows nach dem Absetzen des Befehls dazwischen funken und was anderes machen wollen und schon schreibst du unbedarft falsche Daten auf die Festplatte. Auch ist es fraglich, ob du die MultiWord DMA Modien über das von Windows gebotene Interface bedienen kannst. Auch beachte, dass manche Befehle erst nach einem Timeout als Fehler gemeldet werden.

Vor allem kann ich dir nur empfehlen das unter DOS zu machen, dann hast du mehr Sicherheiten beim direkten ansprechen als unter Windows, da bist du meist nur das 5. Rad am Wagen und hast meist das nachsehen bzw. nicht die für diese Aktion notwendige Sicherheiten.
  Mit Zitat antworten Zitat