Om rampen te vermijden is het van belang op de hoogte te zijn van details in verband met de hoeveelheid gepresteerde uren, aantal schrijf- en leesoperaties en slechte blokken van de gebruikte opslagmedia.
Met deze informatie kan je de slijtage en algemene gezondheid van uw harde schijven achterhalen.
Het meest behulpzame hulpmiddel om deze taak uit te voeren is de smartctl
opdracht, een onderdeel van het pakket smartmontools.
Dit is bij de meeste distributies standaard geïnstalleerd en maakt zeker deel uit van de standaard softwarebronnen.
Om de algemene gezondheidstoestand van de harde schijf /dev/sda na te gaan, gebruik je de -H optie:
dany@linux-2gcr:~> sudo /usr/sbin/smartctl -H /dev/sda
root's password:
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.7-21-desktop] (SUSE RPM)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
De smartctl opdracht kan een zelftest uitvoeren om de conditie van een harde schijf na te gaan. De volgende opdracht start een korte conditietest:
dany@linux-2gcr:~> sudo /usr/sbin/smartctl -t short /dev/sda
root's password:
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.7-21-desktop] (SUSE RPM)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Sat Jul 18 15:18:27 2015
Use smartctl -X to abort test.
Na het uitvoeren van de vorige opdracht, geeft smartctrl aan hoelang te test zal duren. Daarna kan je de resultaten van de zelftest met de volgende opdracht raadplegen:
dany@linux-2gcr:~> sudo /usr/sbin/smartctl -l selftest /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.7-21-desktop] (SUSE RPM)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 971 -
# 2 Short offline Completed without error 00% 592 -
# 3 Short offline Completed without error 00% 575 -
De meest complete gezondheidsstatus (met de algemene apparaat statistieken tabel en fysieke gebeurtenissen tellers) van uw harde schijf kan je opvragen met:
dany@linux-2gcr:~> sudo /usr/sbin/smartctl --xall /dev/sda
smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.16.7-21-desktop] (SUSE RPM)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: SAMSUNG MZ7TD256HAFV-000L9
Serial Number: S17LNSAF241936
LU WWN Device Id: 5 002538 500000000
Firmware Version: DXT02L5Q
User Capacity: 256,060,514,304 bytes [256 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Jul 18 15:23:46 2015 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is: Unavailable
APM feature is: Unavailable
Rd look-ahead is: Enabled
Write cache is: Enabled
ATA Security is: Disabled, frozen [SEC2]
Wt Cache Reorder: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (53956) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 40) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
9 Power_On_Hours -O--CK 099 099 000 - 971
12 Power_Cycle_Count -O--CK 099 099 000 - 899
175 Program_Fail_Count_Chip -O--CK 100 100 010 - 0
176 Erase_Fail_Count_Chip -O--CK 100 100 010 - 0
177 Wear_Leveling_Count PO--C- 097 097 005 - 34
178 Used_Rsvd_Blk_Cnt_Chip PO--C- 100 100 010 - 0
179 Used_Rsvd_Blk_Cnt_Tot PO--C- 100 100 010 - 0
180 Unused_Rsvd_Blk_Cnt_Tot PO--C- 100 100 010 - 6240
181 Program_Fail_Cnt_Total -O--CK 100 100 010 - 0
182 Erase_Fail_Count_Total -O--CK 100 100 010 - 0
183 Runtime_Bad_Block PO--C- 100 100 010 - 0
184 End-to-End_Error PO--CK 100 100 097 - 0
187 Reported_Uncorrect -O--CK 100 100 000 - 0
190 Airflow_Temperature_Cel -O--CK 070 058 000 - 30
195 Hardware_ECC_Recovered -O-RC- 200 200 000 - 0
198 Offline_Uncorrectable ----CK 100 100 000 - 0
199 UDMA_CRC_Error_Count -OSRCK 253 253 000 - 0
233 Media_Wearout_Indicator -O-RCK 199 199 000 - 68750
234 Unknown_Attribute -O--C- 100 100 000 - 0
235 Unknown_Attribute -O--C- 099 099 000 - 72
236 Unknown_Attribute -O--C- 099 099 000 - 20
237 Unknown_Attribute -O--C- 099 099 000 - 34
238 Unknown_Attribute -O--C- 100 100 000 - 0
||||||_ K auto-keep
|||||__ C event count
||||___ R error rate
|||____ S speed/performance
||_____ O updated online
|______ P prefailure warning
General Purpose Log Directory Version 1
SMART Log Directory Version 1 [multi-sector log support]
Address Access R/W Size Description
0x00 GPL,SL R/O 1 Log Directory
0x01 GPL,SL R/O 1 Summary SMART error log
0x02 GPL,SL R/O 1 Comprehensive SMART error log
0x03 GPL,SL R/O 1 Ext. Comprehensive SMART error log
0x06 GPL,SL R/O 1 SMART self-test log
0x07 GPL,SL R/O 1 Extended self-test log
0x09 GPL,SL R/W 1 Selective self-test log
0x10 GPL,SL R/O 1 NCQ Command Error log
0x11 GPL,SL R/O 1 SATA Phy Event Counters
0x30 GPL,SL R/O 1 IDENTIFY DEVICE data log
0x80-0x9f GPL,SL R/W 16 Host vendor specific log
0xa0 GPL,SL VS 16 Device vendor specific log
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
No Errors Logged
SMART Extended Self-test Log Version: 1 (1 sectors)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 971 -
# 2 Short offline Completed without error 00% 592 -
# 3 Short offline Completed without error 00% 575 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
255 0 65535 Read_scanning was never started
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
SCT Status Version: 3
SCT Version (vendor specific): 256 (0x0100)
SCT Support Level: 1
Device State: SCT command executing in background (5)
Current Temperature: 31 Celsius
Power Cycle Min/Max Temperature: 28/40 Celsius
Lifetime Min/Max Temperature: 0/70 Celsius
Under/Over Temperature Limit Count: 0/0
SCT Temperature History Version: 3 (Unknown, should be 2)
Temperature Sampling Period: 1 minute
Temperature Logging Interval: 1 minute
Min/Max recommended Temperature: 0/70 Celsius
Min/Max Temperature Limit: 0/70 Celsius
Temperature History Size (Index): 128 (4)
Index Estimated Time Temperature Celsius
5 2015-07-18 13:16 ? -
... ..(121 skipped). .. -
127 2015-07-18 15:18 ? -
0 2015-07-18 15:19 40 *********************
1 2015-07-18 15:20 28 *********
2 2015-07-18 15:21 29 **********
3 2015-07-18 15:22 30 ***********
4 2015-07-18 15:23 31 ************
SCT Error Recovery Control:
Read: Disabled
Write: Disabled
Device Statistics (GP Log 0x04) not supported
SATA Phy Event Counters (GP Log 0x11)
ID Size Value Description
0x0001 2 0 Command failed due to ICRC error
0x0002 2 0 R_ERR response for data FIS
0x0003 2 0 R_ERR response for device-to-host data FIS
0x0004 2 0 R_ERR response for host-to-device data FIS
0x0005 2 0 R_ERR response for non-data FIS
0x0006 2 0 R_ERR response for device-to-host non-data FIS
0x0007 2 0 R_ERR response for host-to-device non-data FIS
0x0008 2 0 Device-to-host non-data FIS retries
0x0009 2 4 Transition from drive PhyRdy to drive PhyNRdy
0x000a 2 4 Device-to-host register FISes sent due to a COMRESET
0x000b 2 0 CRC errors within host-to-device FIS
0x000d 2 0 Non-CRC errors within host-to-device FIS
0x000f 2 0 R_ERR response for host-to-device data FIS, CRC
0x0010 2 0 R_ERR response for host-to-device data FIS, non-CRC
0x0012 2 0 R_ERR response for host-to-device non-data FIS, CRC
0x0013 2 0 R_ERR response for host-to-device non-data FIS, non-CRC
Met DisKMonitor krijg je een grafische omgeving voor de smartctl opdracht.
Zoals steeds met grafische omgevingen, krijg je een beter overzicht, maar met minder mogelijkheden.
Bovendien zit het pakket niet in de standaard softwarebronnen van openSUSE 13.2.
Misschien omdat het een QT 5 programma is, waarop ook KDE 5 gebaseerd is.
Wat niet betekend, dat je het niet in KDE 4 kunt gebruiken, nogmaals wat is Linux toch een pracht van een systeem.
Ziehier het bewijs.