?? smart.pas
字號:
wCapabilities: USHORT;
wReserved1: USHORT;
wPIOTiming: USHORT;
wDMATiming: USHORT;
wBS: USHORT;
wNumCurrentCyls: USHORT;
wNumCurrentHeads: USHORT;
wNumCurrentSectorsPerTrack: USHORT;
ulCurrentSectorCapacity: ULONG;
wMultSectorStuff: USHORT;
ulTotalAddressableSectors: ULONG;
wSingleWordDMA: USHORT;
wMultiWordDMA: USHORT;
bReserved: array [0..127] of Byte;
// bReserved: string [128];
end; {IDSECTOR}
PIDSECTOR = ^IDSECTOR;
//---------------------------------------------------------------------
// Valid Attribute IDs
//---------------------------------------------------------------------
const
ATTR_INVALID = $00;
ATTR_READ_ERROR_RATE = $01;
ATTR_THROUGHPUT_PERF = $02;
ATTR_SPIN_UP_TIME = $03;
ATTR_START_STOP_COUNT = $04;
ATTR_REALLOC_SECTOR_COUNT = $05;
ATTR_READ_CHANNEL_MARGIN = $06;
ATTR_SEEK_ERROR_RATE = $07;
ATTR_SEEK_TIME_PERF = $08;
ATTR_POWER_ON_HRS_COUNT = $09;
ATTR_SPIN_RETRY_COUNT = $0A;
ATTR_CALIBRATION_RETRY_COUNT = $0B;
ATTR_POWER_CYCLE_COUNT = $0C;
ATTR_TEMPERATURE = $C2;
//
ATTR_REALLOCATED_EVENT_COUNT = $C4;
ATTR_CURR_PENDING_SECTOR = $C5;
ATTR_OFFLINE_UNCORRECTABLE = $C6;
ATTR_UDMA_CRC_ERROR_COUNT = $C7;
ATTR_WRITE_ERROR_COUNT = $C8;
//
//
//---------------------------------------------------------------------
// Status Flags Values
//---------------------------------------------------------------------
const
PRE_FAILURE_WARRANTY = $01;
ON_LINE_COLLECTION = $02;
PERFORMANCE_ATTRIBUTE = $04;
ERROR_RATE_ATTRIBUTE = $08;
EVENT_COUNT_ATTRIBUTE = $10;
SELF_PRESERVING_ATTRIBUTE = $20;
NUM_ATTRIBUTE_STRUCTS = 30;
function StatFlagsToStars (const aFlags: Byte;
const aSep: String = ''): String;
function AttribName (const anId: Integer): String;
implementation
function StatFlagsToStars (const aFlags: Byte;
const aSep: String = ''): String;
begin
if (PRE_FAILURE_WARRANTY and aFlags) <> 0 then
Result := '*' + aSep
else
Result := ' ' + aSep;
if (ON_LINE_COLLECTION and aFlags) <> 0 then
Result := Result + '*' + aSep
else
Result := Result + ' ' + aSep;
if (PERFORMANCE_ATTRIBUTE and aFlags) <> 0 then
Result := Result + '*' + aSep
else
Result := Result + ' ' + aSep;
if (ERROR_RATE_ATTRIBUTE and aFlags) <> 0 then
Result := Result + '*' + aSep
else
Result := Result + ' ' + aSep;
if (EVENT_COUNT_ATTRIBUTE and aFlags) <> 0 then
Result := Result + '*' + aSep
else
Result := Result + ' ' + aSep;
if (SELF_PRESERVING_ATTRIBUTE and aFlags) <> 0 then
Result := Result + '*' + aSep
else
Result := Result + ' ' + aSep;
end;
function AttribName (const anId: Integer): String;
begin
case anId of //翻譯得不準確,不過找不到中文資料
0: Result := 'No Attribute Here ';
1: Result := '數據讀取錯誤率';
2: Result := '吞吐量';
3: Result := '電機啟動時間';
4: Result := '電機啟動/停止次數';
5: Result := '重定位扇區次數';
6: Result := 'Read Channel Margin';
7: Result := '尋道錯誤率';
8: Result := '尋道時間性能';
9: Result := '磁盤上電時間';
10: Result := '電機起動重試次數';
11: Result := '校正重試次數 ';
12: Result := '電源開關次數';
13, 201: Result := '軟件讀取錯誤率';
192,225: Result := '電源關閉次數';
193: Result := '磁頭歸位次數';
194, 231: Result := '溫度';
195: Result := '硬件ECC恢復';
196: Result := '重定位事件次數';
197: Result := '當前等待扇區數'; 198: Result := '無法糾正扇區數'; 199: Result := 'UDMA CRC 錯誤數'; 200: Result := '寫入數據錯誤率'; 202: Result := 'DAM錯誤數'; 206: Result := '磁頭懸浮高度'; 240: Result := '磁頭懸浮時間'; else Result := '未知屬性'; end;{0 00h Invalid Invalid attribute identifier1 01h 數據讀取錯誤率 從磁盤讀取原始數據的出錯頻率
2 02h 吞吐量 磁盤平均讀寫效率
3 03h 啟動時間 啟動旋轉所需時間
4 04h Start/Stop count Number of spindle start/stop cycles
5 05h Reallocated sector count Quantity of remapped sectors
6 06h Read channel margin Reserve of channel while reading
7 07h Seek error rate Frequency of errors while positioning
8 08h Seek timer performance Average efficiency of operations while positioning
9 09h Power-on hours count Number of hours elapsed in the power-on state
10 0Ah Spinup retry count Number of retry attempts to spin up
11 0Bh Calibration retry count Number of attempts to calibrate the device
12 0Ch Power cycle count Number of power-on events
13 0Dh Soft read error rate Frequency of ‘program’ errors while reading
from a disk
187 BBh vendor-specific vendor-specific
189 BDh vendor-specific vendor-specific
190 BEh vendor-specific vendor-specific
191 BFh G-sense error rate Fequency of mistakes as a result of impact
loads
192 C0h Power-off retract count Number of power-off or emergency retract cycles
193 C1h Load/Unload cycle count Number of cycles into landing zone position
194 C2h HDA temperature Temperature of a hard disk assembly
195 C3h Hardware ECC recovered Number of ECC on-the-fly errors
196 C4h Reallocation count Number of remapping operations
197 C5h Current pending sector count Number of unstable sectors (waiting for
remapping)
198 C6h Offline scan uncorrectable count Number of uncorrected errors
199 C7h UDMA CRC error rate Number of CRC errors during UDMA mode
200 C8h Write error rate Number of errors while writing to disk (or)
multi-zone error rate (or)
flying height
201 C9h Soft read error rate Number of off-track errors
202 Cah Data Address Mark errors Number of Data Address Mark (DAM) errors
(or) vendor-specific
203 CBh Run out cancel Number of ECC errors
204 CCh Soft ECC correction Number of errors corrected by software ECC
205 CDh Thermal asperity rate
(TAR)
Number of thermal asperity errors
206 CEh Flying height Height of heads above the disk surface
207 CFh Spin high current Amount of high current used to spin up the
drive
208 D0h Spin buzz Number of buzz routines to spin up the drive
209 D1h Offline seek performance Drive’s seek performance during offline
operations
220 DCh Disk shift Shift of disk is possible as a result of strong
shock loading in the store, as a result of falling
(or) temperature
221 DDh G-sense error rate Number of errors as a result of impact loads
as detected by a shock sensor
222 DEh Loaded hours Number of hours in general operational state
223 DFh Load/unload retry count Loading on drive caused by numerous
recurrences of operations, like reading,
recording, positioning of heads, etc.
224 E0h Load friction Load on drive caused by friction in mechanical
parts of the store
225 E1h Load/Unload cycle count Total number of load cycles
226 E2h Load-in time General time for loading in a drive
227 E3h Torque amplification count Quantity efforts of the rotating moment of a
drive
228 E4h Power-off retract count Number of power-off retract events.
230 E6h GMR head amplitude Amplitude of heads trembling (GMR-head) in
running mode
231 E7h Temperature Temperature of a drive
240 F0h Head flying hours Time while head is positioning
250 FAh Read error retry rate Number of errors while reading from a disk
}end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -