How do I use SMART tools on opensuse to check on my notebooks hard drive?

hello dear linux-experts good day :wink:

How do I use SMART tools to check on my notebooks hard drive? That is the question of the day for me. i want to run a SMART-Test on my notebook to test the harddrive.

i have opensuse 13.1 on the machine: and the SMART-Tools are installed.

SMART (Self-Monitoring, Analysis, and Reporting Technology) is a technology included in most hard drives today.

**Short test: ** According to the documentation, this command can be given during normal system operation (unless run in captive mode).

i can run the test:

smartctl --test=short /dev/sda1

see here what happens:



martin@linux-70ce:~> su
Passwort:
linux-70ce:/home/martin # smartctl --test=short /dev/sda1
smartctl 6.2 2013-07-26 r3841 [i686-linux-3.11.10-25-desktop] (SUSE RPM)
Copyright (C) 2002-13, 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 Tue Jan 20 00:29:16 2015

Use smartctl -X to abort test.
linux-70ce:/home/martin #

hmm - this seems to be a short (quick ) test. But i have to wait to see the results. Question: do they come to the terminal - are they are shown in the terminal?

btw: i also can run the ** Long Test**:

The long test can also be run on a live system, and will do a lot deeper testing on the device, however it will take significantly longer to finish.
smartctl --test=long /dev/sda smartctl

well - how can i run tests on all the partitions: is this possible to do this with only one single step?


                                                                             cfdisk (util-linux 2.23.2)

                                                                                Festplatte: /dev/sda
                                                                       GrM-CM-6M-C~_e: 320072933376 Bytes, 320,0 GB
                                                               KM-CM-6pfe: 255   Sektoren pro Spur: 63   Zylinder: 38913

         Name                       Flags                     Part. Typ              Dateisystemtyp                       [Bezeichner]                    GrM-CM-6M-C~_e (MB)
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                               PrimM-CM-$re          Freier Bereich                                                           164,63               *
         sda4                                                  PrimM-CM-$re          LVM2_member                                                             1990,20               *
         sda2                                                  PrimM-CM-$re          LVM2_member                                                            21475,89               *
         sda5                       NC                         Logische              swap                                                                    2155,88               *
         sda6                       NC                         Logische              ext4                                                                   21475,89               *
         sda7                       NC                         Logische              ext4                                                                  272799,63               *
                                                               Pri/Log               Freier Bereich                                                            10,84               *



but what can i do if i want to Get it all:

there are options to do that - getting it all:

The next and last command will output all the information the drive can possibly give. In the response below I have selectively removed a lot of output because there is a lot information to go through. My main point is the command and something I will get to in just a second.

smartctl -a /dev/sda Device Mode

since the harddrive has differnet partitions - the question arises: how to test all at once?

question: which way to get the drive tested in one single step
are there options to do that - getting it all in a single command.

look forward to any and all hints and help

greetings

smart does not care about partition it checks the drive. The info comes from logs that smart (it run on the drive firmware) maintains

For all the options refer to the manual file

man smartctl

There are some program that can be run that continuously monitor the drive(s)

hello dear ogalthorp

many thanks for the reply.

There are some program that can be run that continuously monitor the drive(s)

you are talkin bout non-smart-tools!?

well i think that smart can do reports - reports bout monitoring the hdd in different modes…

after running the required test does cmd

sudo smartctl -x /dev/sda

give you the expected results?

it looks as though a wait of > 131 minutes is necessary if the long test is selected.

hello dear keelambert

many thanks for the reply.

i runned the command and got back the following


home/martin # 
linux-70ce:/home/martin # sudo smartctl -x /dev/sda
smartctl 6.2 2013-07-26 r3841 [i686-linux-3.11.10-25-desktop] (SUSE RPM)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Fujitsu MHZ BH
Device Model:     FUJITSU MHZ2320BH G2
Serial Number:    K62WT8A29HHG
LU WWN Device Id: 5 00000e 042eacd5c
Firmware Version: 00000009
User Capacity:    320.072.933.376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 3f
SATA Version is:  SATA 2.5, 3.0 Gb/s
Local Time is:    Wed Jan 21 00:25:20 2015 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM level is:     254 (maximum performance), recommended: 254
APM level is:     128 (minimum power consumption without standby)
Rd look-ahead is: Enabled
Write cache is:   Enabled
ATA Security is:  Disabled, NOT FROZEN [SEC1]
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:      ( 121) The previous self-test completed having                                                                                                     
                                        the read element of the test failed.                                                                                                        
Total time to complete Offline                                                                                                                                                      
data collection:                ( 1298) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        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:        ( 184) minutes.
Conveyance self-test routine
recommended polling time:        (   2) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   100   100   046    -    154279
  2 Throughput_Performance  P-S---   100   100   030    -    57344000
  3 Spin_Up_Time            PO----   100   100   025    -    1
  4 Start_Stop_Count        -O--CK   098   098   000    -    5286
  5 Reallocated_Sector_Ct   PO--CK   100   100   024    -    0 (2000 0)
  7 Seek_Error_Rate         POSR--   100   100   047    -    3888
  8 Seek_Time_Performance   P-S---   100   100   019    -    0
  9 Power_On_Hours          -O--CK   084   084   000    -    8152
 10 Spin_Retry_Count        PO--C-   100   100   020    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    3225
192 Power-Off_Retract_Count -O--CK   100   100   000    -    245
193 Load_Cycle_Count        -O--CK   095   095   000    -    113825
194 Temperature_Celsius     -O---K   100   001   000    -    54 (Min/Max 10/90)
195 Hardware_ECC_Recovered  -O-RC-   100   100   000    -    1426
196 Reallocated_Event_Count -O--CK   100   100   000    -    0 (0 6600)
197 Current_Pending_Sector  -O--C-   100   096   000    -    1
198 Offline_Uncorrectable   ----C-   097   097   000    -    7
199 UDMA_CRC_Error_Count    -OSRCK   200   253   000    -    0
200 Multi_Zone_Error_Rate   POSR--   100   100   060    -    29377
203 Run_Out_Cancel          -O----   100   099   000    -    433737759488
240 Head_Flying_Hours       -OSRCK   200   200   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     51  Comprehensive SMART error log
0x03       GPL,SL  R/O     64  Ext. Comprehensive SMART error log
0x06       GPL,SL  R/O      1  SMART self-test log
0x07       GPL,SL  R/O      2  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
0x23       GPL,SL  R/O      1  Delayed sector log [OBS-8]
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa1       GPL,SL  VS       1  Device vendor specific log

SMART Extended Comprehensive Error Log Version: 1 (64 sectors)
Device Error Count: 225
        CR     = Command Register
        FEATR  = Features Register
        COUNT  = Count (was: Sector Count) Register
        LBA_48 = Upper bytes of LBA High/Mid/Low Registers ]  ATA-8
        LH     = LBA High (was: Cylinder High) Register    ]   LBA
        LM     = LBA Mid (was: Cylinder Low) Register      ] Register
        LL     = LBA Low (was: Sector Number) Register     ]
        DV     = Device (was: Device/Head) Register
        DC     = Device Control Register
        ER     = Error register
        ST     = Status register
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 225 [224] occurred at disk power-on lifetime: 6824 hours (284 days + 8 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 41 00 03 00 02 63 00 c0 44 40 00  Error: UNC at LBA = 0x26300c044 = 10250928196

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  60 00 40 00 00 00 02 56 00 c0 00 40 08     01:14:12.064  READ FPDMA QUEUED
  61 00 20 00 10 00 04 96 00 47 e8 40 08     01:14:12.052  WRITE FPDMA QUEUED
  60 00 08 00 08 00 24 b6 00 04 28 40 08     01:14:12.052  READ FPDMA QUEUED
  60 00 40 00 00 00 02 63 00 c0 00 40 08     01:14:12.052  READ FPDMA QUEUED
  ef 00 10 00 02 00 00 00 00 00 00 a0 08     01:14:12.052  SET FEATURES [Enable SATA feature]

Error 224 [223] occurred at disk power-on lifetime: 6824 hours (284 days + 8 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 41 00 03 00 24 b6 00 04 2d 40 00  Error: UNC at LBA = 0x24b600042d = 157672277037

  -- -- -- == -- == == == -- -- -- -- --
  40 -- 41 00 03 00 04 22 00 45 ea 40 00  Error: UNC at LBA = 0x4220045ea = 17750312426

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  60 00 08 00 18 00 24 b6 00 04 28 40 08     03:56:21.312  READ FPDMA QUEUED
  60 00 08 00 10 00 05 a7 00 04 00 40 08     03:56:21.312  READ FPDMA QUEUED
  60 00 08 00 08 00 05 ab 00 01 a8 40 08     03:56:21.312  READ FPDMA QUEUED
  61 00 08 00 00 00 04 22 00 45 d0 40 08     03:56:21.312  WRITE FPDMA QUEUED
  ea 00 00 00 00 00 00 00 00 00 00 a0 08     03:56:21.243  FLUSH CACHE EXT

Error 220 [219] occurred at disk power-on lifetime: 6815 hours (283 days + 23 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 41 00 03 00 04 22 00 45 d4 40 00  Error: WP at LBA = 0x4220045d4 = 17750312404

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  61 00 08 00 18 00 24 a9 00 0c 18 40 08     03:56:16.072  WRITE FPDMA QUEUED
  61 00 18 00 10 00 15 b8 00 44 30 40 08     03:56:16.072  WRITE FPDMA QUEUED
  60 00 08 00 08 00 24 b6 00 04 28 40 08     03:56:16.072  READ FPDMA QUEUED
  61 00 20 00 00 00 04 22 00 45 b0 40 08     03:56:16.072  WRITE FPDMA QUEUED
  ef 00 10 00 02 00 00 00 00 00 00 a0 08     03:56:16.071  SET FEATURES [Enable SATA feature]

Error 219 [218] occurred at disk power-on lifetime: 6815 hours (283 days + 23 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 41 00 03 00 05 ab 00 01 fc 40 00  Error: WP at LBA = 0x5ab0001fc = 24343740924


SMART Extended Self-test Log Version: 1 (2 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       90%      8139         604288557

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
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:                  2
SCT Version (vendor specific):       0 (0x0000)
SCT Support Level:                   1
Device State:                        Active (0)
Current Temperature:                    54 Celsius
Power Cycle Min/Max Temperature:     16/63 Celsius
Lifetime    Min/Max Temperature:     10/90 Celsius
Under/Over Temperature Limit Count:   0/0
SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        1 minute
Min/Max recommended Temperature:      5/60 Celsius
Min/Max Temperature Limit:           -40/65 Celsius
Temperature History Size (Index):    478 (72)
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  4            0  Command failed due to ICRC error
0x0002  4            0  R_ERR response for data FIS
0x0003  4            0  R_ERR response for device-to-host data FIS
0x0004  4            0  R_ERR response for host-to-device data FIS
0x0005  4            0  R_ERR response for non-data FIS
0x0006  4            0  R_ERR response for device-to-host non-data FIS
0x0008  4            0  Device-to-host non-data FIS retries
0x0009  4            5  Transition from drive PhyRdy to drive PhyNRdy
0x000a  4            6  Device-to-host register FISes sent due to a COMRESET
0x000b  4            0  CRC errors within host-to-device FIS
0x000d  4            0  Non-CRC errors within host-to-device FIS
0x000f  4            0  R_ERR response for host-to-device data FIS, CRC
0x0010  4            0  R_ERR response for host-to-device data FIS, non-CRC


well quite lots of information

hi dilbertone,

at line,
127 Error 225 [224] …
144 Error 224 [223] …
164 Error 220 [219] …
181 Error 219 [218] …
do not know what to make of these outputs
perhaps others can help

what’s your ambient temperature?
line.
209 Current Temperature: 54 Celsius
this looks a little on the high side

cheers

hello dear keellambert

many many thanks for the reply -great to hear from you!!

well i do not know how to understand the mentioned issues. but i found some more infos.

with that i think that i am able to run the SMART-Tools in the System

well according the manual i found here i am pretty sure that this works for ubuntu:

The Beginner?s Guide to Linux Disk Utilities

Most modern ATA and SCSI hard disks have a Self-Monitoring, Analysis, and Reporting Technology (SMART) system. SMART hard disks internally monitor their own health and performance.

The SMART tool assesses the condition of your hard disk based on: the throughput of the hard disk, the seek errors rate of the magnetic heads, and other attributes that your hard disk manufacturer built into their hard disk.

Most implementations of SMART systems allow users to perform self-tests to monitor the performance and reliability of their hard disks. The simplest way to perform a SMART system test with Ubuntu is using the ‘Disk Utility’ under the ‘System’ > ‘Administration’ menu.

again - see here the link The Beginner?s Guide to Linux Disk Utilities

well - i am pretty impressed. the tools look impessive; for sure!

i want to use them - do you think that i am able to do so!?

hi dilbertone

its not clear what you are trying to achieve

if the information is needed on how to use SMART
then read the output of cmds
info smartctl
or
man smartctl (as already given by gogalthorp above)
or try the webpage
www.smartmontools.org

or are just looking for a gui for SMART?
if so I’m not awhere of one on openSUSE

cheers

hi dilbertone

oops, missed the following

from

http://ftp5.gwdg.de/pub/opensuse/repositories/home:/alex_sh/openSUSE_Tumbleweed/x86_64/

gsmartcontrol-0.8.7-28.8.x86_64.rpm

can be downloaded

this rpm needs the two packages installed first

gsmartcontrol
libglademm

after install the resultant window looks like as referred to in your post above, #7

cheers

NB. if gsmartcontrol is installed via yast software manager, the other two packages are pulled in automatically.

Why a package for tumbleweed?

https://software.opensuse.org/package/gsmartcontrol

@ Sauerland

its not limited to Tumbleweed,
quote;
the rpm’s are also there for 13.1, 12.3, 12.2,
12.1, 11.4, 11.3, 11.2, 11.1, 11.0, 10.3, 10.2. See OBS project directory for
direct access to packages for both current and older distribution releases. The
OBS project also acts as repomd (yast/zypper) installation source.
Use a direct link to OBS directory mirror if you don’t see all the packages for
every SUSE/openSUSE release since 10.0 (some mirrors omit the discontinued
ones).

On 2015-01-26 02:06, keellambert wrote:
> or are just looking for a gui for SMART?
> if so I’m not awhere of one on openSUSE

Gnome disk tool has it. I don’t know the name of the program.

–
Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

hello again

many thanks - tried to install the tumbleweed things o n my system - it ended up with errors n issues

Akonadi Server Self-Test Report

Test 1: SUCCESS

Database driver found.
Details: The QtSQL driver ‘QMYSQL’ is required by your current Akonadi server configuration and was found on your system.

File content of ‘/home/martin/.config/akonadi/akonadiserverrc’:
%General]
Driver=QMYSQL

[QMYSQL]
Name=akonadi
Host=
Options=“UNIX_SOCKET=/tmp/akonadi-martin.efV8IU/mysql.socket”
ServerPath=/usr/sbin/mysqld
StartServer=true

[Debug]
Tracer=null

Test 2: SUCCESS

Akonadi is not running as root
Details: Akonadi is not running as a root/administrator user, which is the recommended setup for a secure system.

Test 3: SUCCESS

MySQL server found.
Details: You have currently configured Akonadi to use the MySQL server ‘/usr/sbin/mysqld’.
Make sure you have the MySQL server installed, set the correct path and ensure you have the necessary read and execution rights on the server executable. The server executable is typically called ‘mysqld’; its location varies depending on the distribution.

Test 4: SUCCESS

MySQL server is executable.
Details: MySQL server found: /usr/sbin/mysqld Ver 10.0.13-MariaDB for Linux on x86_64 (openSUSE package)

Test 5: ERROR

MySQL server log contains errors.
Details: The MySQL server error log file ‘<a href=’/home/martin/.local/share/akonadi/db_data/mysql.err’>/home/martin/.local/share/akonadi/db_data/mysql.err</a>’ contains errors.

File content of ‘/home/martin/.local/share/akonadi/db_data/mysql.err’:
2015-01-27 00:45:55 7fbac23f3740 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB’s internal memory allocator.
150127 0:45:55 [Note] InnoDB: Using mutexes to ref count buffer pool pages

and so on …

any idea

If you are NOT running Tumbleweed and maybe don’t even know what it is you should not be installing packages from any of it’'s repos unless you truly know what you are doing.

The program is available in the regular repos

hi dilbertone

which repos are active?

if the correct ones are selected, all dependent packages will be pulled in during the install process,
on an hp-g7 laptop, 7 extra packages were needed, ymmv

how did you try to install?
it should be done via zypper or yast software management!

cheers

On 2015-01-21 00:36, dilbertone wrote:

> SMART Attributes Data Structure revision number: 16
> Vendor Specific SMART Attributes with Thresholds:
> ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE

> 197 Current_Pending_Sector -O–C- 100 096 000 - 1
> 198 Offline_Uncorrectable ----C- 097 097 000 - 7

Bad news. Your hard disk is developing bad sectors. You could try
rewriting the entire disk with zeros (destroying everything), then redo
the SMART long test and compare results. You’d better have a good backup.

It often means replacing the disk.

At this point, forget about installing anything.

> SMART Extended Self-test Log Version: 1 (2 sectors)
> Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
> # 1 Short offline Completed: read failure 90% 8139 604288557

And that without even running a complete long test, ever. :frowning:

–
Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2015-01-27 01:56, dilbertone wrote:
>
> hello again
>
>
> many thanks - tried to install the tumbleweed things o n my system -
> it ended up with errors n issues

You are installing from tumbleweed?
Do you wish to destroy your system? :-o

–
Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

hi dilbertone,

side tracking, temperature!

some bios’ are set to AUTO for the HDD data transfer rate,
calibration occurs when the machine is cold and high rates are possible,
try setting the rate in the bios to MANUAL and choosing a lower rate

(the HDD data sheet will be needed for compatible modes)

hth