hab nen SMART Ausdruck wie folgt:
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 100 051 Pre-fail Always - 5
3 Spin_Up_Time 0x0007 100 100 025 Pre-fail Always - 6208
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 808
5 Reallocated_Sector_Ct 0x0033 098 098 010 Pre-fail Always - 25
7 Seek_Error_Rate 0x000f 253 253 051 Pre-fail Always - 0
8 Seek_Time_Performance 0x0025 253 253 015 Pre-fail Offline - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 3108
10 Spin_Retry_Count 0x0033 253 253 051 Pre-fail Always - 0
11 Calibration_Retry_Count 0x0012 253 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 390
187 Unknown_Attribute 0x0032 001 001 000 Old_age Always - 343
190 Temperature_Celsius 0x0022 124 100 000 Old_age Always - 38
194 Temperature_Celsius 0x0022 124 100 000 Old_age Always - 38
195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 16533269
196 Reallocated_Event_Count 0x0032 098 098 000 Old_age Always - 25
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0030 253 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x000a 100 100 000 Old_age Always - 0
201 Soft_Read_Error_Rate 0x000a 100 100 000 Old_age Always - 0
202 TA_Increase_Count 0x0032 100 100 000 Old_age Always - 5
Möchet nun zum Beispiel die Realocated Sektoren auslesen und ich eine Hash Tabelle reinschreiben!
mach das im Moment so, indem ich die Zeile splitte mit nem Leerzeichen und diese Leerzeichen dann zähle.
--> Dies find ich sehr umständlich, da ich immer die Leerzeichen zählen muss, aber hab keine Ahnung wie ich das anders meistern soll!
Würd mich freuen wenn mir da einer helfen könnte!
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 100 051 Pre-fail Always - 5
3 Spin_Up_Time 0x0007 100 100 025 Pre-fail Always - 6208
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 808
5 Reallocated_Sector_Ct 0x0033 098 098 010 Pre-fail Always - 25
7 Seek_Error_Rate 0x000f 253 253 051 Pre-fail Always - 0
8 Seek_Time_Performance 0x0025 253 253 015 Pre-fail Offline - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 3108
10 Spin_Retry_Count 0x0033 253 253 051 Pre-fail Always - 0
11 Calibration_Retry_Count 0x0012 253 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 390
187 Unknown_Attribute 0x0032 001 001 000 Old_age Always - 343
190 Temperature_Celsius 0x0022 124 100 000 Old_age Always - 38
194 Temperature_Celsius 0x0022 124 100 000 Old_age Always - 38
195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 16533269
196 Reallocated_Event_Count 0x0032 098 098 000 Old_age Always - 25
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0030 253 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x000a 100 100 000 Old_age Always - 0
201 Soft_Read_Error_Rate 0x000a 100 100 000 Old_age Always - 0
202 TA_Increase_Count 0x0032 100 100 000 Old_age Always - 5
Möchet nun zum Beispiel die Realocated Sektoren auslesen und ich eine Hash Tabelle reinschreiben!
mach das im Moment so, indem ich die Zeile splitte mit nem Leerzeichen und diese Leerzeichen dann zähle.
Code:
if (zeile.startsWith("ID#"))
{
offSet = line;
}
if (line == offSet + 4)
{
tempArray = zeile.split(" ");
for(int i=0 ;i<tempArray.length;i++)
{
if (i==9)
{
result.put("Value" , tempArray[i]);
}
}
}
--> Dies find ich sehr umständlich, da ich immer die Leerzeichen zählen muss, aber hab keine Ahnung wie ich das anders meistern soll!
Würd mich freuen wenn mir da einer helfen könnte!