S.M.A.R.T. - smartmontools

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

S.M.A.R.T.

(Self-Monitoring, Analysis and Reporting Technology)

apt-get install smartmontools
sudo smartctl -PARAMETER GERÄTENAME 

Parameter Beschreibung -i Gibt an, ob S.M.A.R.T. verfügbar ist. -s on S.M.A.R.T. wird aktiviert. -h Befehlsreferenz -A Werte aller Attribute -H Abfrage des Gesundheitszustands -c Überprüfung, welche Tests (TEST) möglich sind / Zeit, die diese benötigen -S on Automatisches Speichern der Einstellungen. -t TEST Durchführung des möglichen Tests (short, offline, long ...) -o on Startet die Offline Tests mit einem 4-Stunden-Zyklus. -t long Startet einen langen selftest. Der Test ist auch unter dem Synonym Oberflächenanalyse bekannt. -t short Startet einen kurzen selftest. Der Test ist zwar kurz, dauert aber mindestens eine Minuten -t offline Startet sofort die Offline Tests. -l selftest Zeigt das Log des letzten Selbsttests. -X Test abbrechen -l error Fehlermeldungen ausgeben


Beispiele:

root@gecko:~ || smartctl -H /dev/sda
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED


root@gecko:~ || smartctl -A /dev/sda
=== START OF READ SMART DATA SECTION ===
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     0x002f   100   100   051    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0026   252   252   000    Old_age   Always       -       0
  3 Spin_Up_Time            0x0023   083   083   025    Pre-fail  Always       -       5239
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       605
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       4989
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   252   252   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       611
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       2
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0002   064   059   000    Old_age   Always       -       35 (Min/Max 16/41)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   100   100   000    Old_age   Always       -       3
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       2
223 Load_Retry_Count        0x0032   252   252   000    Old_age   Always       -       0
225 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       612


root@ordinateur:~# smartctl -t long on /dev/sda smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.5.0-23-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

ERROR: smartctl takes ONE device name as the final command-line argument. You have provided 2 device names: on /dev/sda

Use smartctl -h to get a usage summary

root@ordinateur:~# smartctl -t long /dev/sda smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.5.0-23-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION

Sending command: "Execute SMART Extended self-test routine immediately in off-line mode". Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful. Testing has begun. Please wait 70 minutes for test to complete. Test will complete after Wed Apr 10 11:09:16 2013

Use smartctl -X to abort test. root@ordinateur:~# root@ordinateur:~# root@ordinateur:~# root@ordinateur:~# smartctl -l selftest smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.5.0-23-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

ERROR: smartctl requires a device name as the final command-line argument.


Use smartctl -h to get a usage summary

root@ordinateur:~# smartctl -l selftest /dev/sda smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.5.0-23-generic] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

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. 1 Extended offline Completed without error 00% 3 -