SMART-Werte auslesen und interpretieren

  • Ab sofort steht euch hier im Forum die neue Add-on Verwaltung zur Verfügung – eine zentrale Plattform für alles rund um Erweiterungen und Add-ons für den DSM.

    Damit haben wir einen Ort, an dem Lösungen von Nutzern mit der Community geteilt werden können. Über die Team Funktion können Projekte auch gemeinsam gepflegt werden.

    Was die Add-on Verwaltung kann und wie es funktioniert findet Ihr hier

    Hier geht es zu den Add-ons

@framp
You can send emails via a script using DSM's ssmtp. Though it's not a simple one line of code (more like 68 lines if you want to make it bullet-proof). You could strip it down to about 13 lines if you removed all the checking.

The script needs to create a txt file that contains the to and from email addresses, subject and the body of the email.

Have a look at the function in https://github.com/007revad/Linux_Plex_Backup/blob/develop/Linux_Plex_Backup.sh from line 175 to 234.

NOTE: Change msmtp to ssmtp for DSM.

Add the following near the top of the script:
Code:
to_email_address=you@gmail.com
from_email_address=you@gmail.com
email_directory=/tmp

Then you'd need to add the following later in the script where you want to send to the email:
Code:
    # Send log via email if both logging and emails are enabled
    if [[ $to_email_address && $from_email_address ]]; then
        echo -e "\nSending email..."
        email_contents="email_contents.txt"
        send_email "$to_email_address" "$from_email_address" "$email_directory"  "$email_contents" "$script log"
    fi
 
  • Like
Reaktionen: framp und maxblank
I threw SMART values of my disks at ChatGPT and I got a very nice and detailed analysis report.

I think I don't have to reinvent the wheel again. I'm sure there exist already OSS SMART value analysis tools for Linux. I only have to find them 🧐
 
  • Haha
Reaktionen: ctrlaltdelete
  • Like
Reaktionen: AndiHeitzer
I didn't know about your script 😠. Will test it right now. Should work because I use WD disks.
 
Works perfect (y)
Everything is OK according you script output.

ChatGPT warned me the power on time is beyond the usual lifetime of a disk when it's running for > 5 years. I got also other warning about the disk spin update time from ChatGPT which seems to be a valid warning.
 
ChatGPT is often misleading, or even completely wrong.

For NAS and server drives the power on time would normally be "24 x 365 x the number years the drive has been in the NAS or server". So it's impossible for a drive to have "the power on time is beyond the usual lifetime of a disk when it's running for > 5 years".

Spin up time is just the "number of times you've rebooted the NAS x how long it takes the drive to spin up".

The SMART attributes to monitor, according to BackBlaze, are:

AttributeDescription
SMART 5Reallocated Sectors Count
SMART 187Reported Uncorrectable Errors
SMART 188Command Timeout
SMART 197Current Pending Sector Count
SMART 198Uncorrectable Sector Count
 
  • Like
Reaktionen: framp und dil88
I'm sorry but I don't get your point :(
Was "the power on time is beyond the usual lifetime of a disk when it's running for > 5 years" exactly what ChatGPT wrote? Or was that how you phrased it?

That sentence is confusing (to me). I understood "the power on time is beyond the usual lifetime of a disk when it's running for > 5 years" to be saying the drive has been running for more hours than a drive > 5 years should have.

If it was ChatGPT why didn't it just say "the disk is has been running for more than 5 years and drives usually die after being powered on for 5 years".
 
I got you now 🙂 . It's the wording but finally it's nevertheless a hint the disk is active for more than 5 years when disks may start to degrade.

Spin up time is just the "number of times you've rebooted the NAS x how long it takes the drive to spin up".
Are you sure? I'm just in the beginning to learn about the semantic of the SMART values - but for me the worst value is the worst spin up time and if it's increasing this gives me an indication the drive motor starts to degrade.

But as far as I understand right now - you get a lot of SMART values but it's quite difficult to identify drives which may fail in a given time frame from these values.
 
Spin up time is just the "number of times you've rebooted the NAS x how long it takes the drive to spin up".
I was wrong again. It happens sometimes :(

According to Acronis:
Spin-Up Time S.M.A.R.T. parameter indicates an average time (in milliseconds or seconds) of spindle spinup (from zero RPM (Revolutions Per Minute) to fully operational).

The low value means it takes too long for the hard disk to a fully operational state.

This parameter is considered informational by the most hardware vendors. Although degradation of this parameter can be an indicator of drive aging and/or potential electromechanical problems, it does not directly indicate imminent drive failure. Regular backup is recommended. Pay closer attention to other parameters and overall drive health.
 
  • Love
Reaktionen: dil88
Hallo-Ich habe das jetzt mal bei meiner DS224+ mit 2 Synology HAT3300-6T ausprobiert-die ja Seagate Platten sind.

Mit diesem Befehl als root auf der Konsole erhalte ich eine Ausgabe mit mit den bekannten hohen Zahlenwert.
smartctl -iA -d sat /dev/sata1

Code:
root@XXXXXXXX:~# smartctl -iA -d sat /dev/sata1
smartctl 6.5 (build date Sep 26 2022) [x86_64-linux-4.4.302+] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     HAT3300
Device Model:     Synology HAT3300-6T
Serial Number:    XXXXXXXX
LU WWN Device Id: 5 000c50 0e9286191
Firmware Version: PL01
User Capacity:    6,001,175,126,016 bytes [6.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Apr 10 22:59:34 2025 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME                                                   FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Error_Rate                                                   0x000f   083   064   006    Pre-fail  Always       -       183702669
  3 Spin_Up_Time                                                     0x0003   091   091   000    Pre-fail  Always       -       0
  4 Start/Stop_Count                                                 0x0032   100   100   020    Old_age   Always       -       129
  5 Reallocated_Sector_Ct                                            0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate                                                  0x000f   081   060   045    Pre-fail  Always       -       127118856
  9 Power_On_Hours                                                   0x0032   099   099   000    Old_age   Always       -       1663
 10 Spin_Retry_Count                                                 0x0013   100   100   097    Pre-fail  Always       -       0
 12 Drive_Power_Cycle_Count                                          0x0032   100   100   020    Old_age   Always       -       121
183 PHY_Counter_Events                                               0x0032   100   100   000    Old_age   Always       -       0
184 Reported_IOEDC_Errors                                            0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrectables                                          0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeouts                                                 0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes                                                  0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature                                              0x0022   071   068   040    Old_age   Always       -       29 (Min/Max 18/31)
191 Shock_Count                                                      0x0032   100   100   000    Old_age   Always       -       0
192 Emergency_Retract_Count                                          0x0032   100   100   000    Old_age   Always       -       49
193 Load/Unload_Count                                                0x0032   100   100   000    Old_age   Always       -       357
194 Temperature                                                      0x0022   029   040   000    Old_age   Always       -       29 (0 11 0 0 0)
195 ECC_On_the_Fly_Count                                             0x001a   083   064   000    Old_age   Always       -       183702669
197 Current_Pending_Sector                                           0x0012   100   100   000    Old_age   Always       -       0
198 Uncorrectable_Sectors_Count                                      0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count                                             0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flight_Hours                                                0x0000   100   253   000    Old_age   Offline      -       108606838015581
241 Lifetime_Writes_From_host                                        0x0000   100   253   000    Old_age   Offline      -       12418115725
242 Lifetime_Reads_From_Host                                         0x0000   100   253   000    Old_age   Offline      -       13872260588

root@XXXXXXXX:~#

Soweit ok-wenn ich jedoch als root eingebe um gleich die umgerechneten Werte zu sehen
"smartctl -iA -v 1,raw48:54 -v 7,raw48:54 -v 195,raw48:54 /dev/sata1"
erhalte ich jedoch dieses

Code:
root@XXXXXXXXXX:~# smartctl -iA -v 1,raw48:54 -v 7,raw48:54 -v 195,raw48:54 /dev/sata1
smartctl 6.5 (build date Sep 26 2022) [x86_64-linux-4.4.302+] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Synology
Product:              HAT3300-6T
Revision:             PL01
User Capacity:        6,001,175,126,016 bytes [6.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Rotation Rate:        5400 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000c500e9286191
Serial number:        XXXXXXXX
Device type:          disk
Local Time is:        Thu Apr 10 22:30:56 2025 CEST
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===
root@XXXXXXXXX:~#

Hat hier Synology was an deren Firmware "verbockt" das eben dieses Ergebnis kommt?
" device lacks SMART capability"
Gerät ist nicht SMART-fähig?????
Danke für Eure Rückmeldung.
 
Zuletzt bearbeitet:
Danke für Deine Information@DaveR
Ich habe die SynoCli Disk Tools installiert und mit dem Befehl

Code:
smartctl7 -iA -d sat -v 1,raw48:54 -v 7,raw48:54 -v 195,raw48:54 /dev/sata1

funktioniert das jetz!
 
  • Like
Reaktionen: DaveR
Guten Morgen, kann mir jemand sagen ob diese Platte Fehler hat?
Die ID188 und ID199 machen mir Sorgen. Laut scrutiny sollte vor allem die 188 bei 0 sein.
Bei allen meinen anderen Festplatten (Toshiba) sind alle Werte auf 0.
Oder gehört die ID188 auch umgerechnet wie zb. ID1?
Ich nutze diese Platte nur für SS mit 4 Kameras

LG Nackel


=== START OF INFORMATION SECTION ===
Model Family: Seagate IronWolf Pro
Device Model: ST4000NE001-2MA101
Serial Number: WS24TGH7
LU WWN Device Id: 5 000c50 0e7518391
Firmware Version: EN01
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5528
ATA Version is: ACS-4 (minor revision not indicated)
SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat May 24 01:00:02 2025 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

SMART Attributes Data Structure revision number: 10
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 084 064 044 Pre-fail Always - 0
3 Spin_Up_Time 0x0003 092 091 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 504
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 077 060 045 Pre-fail Always - 0
9 Power_On_Hours 0x0032 095 095 000 Old_age Always - 4959
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 464
18 Head_Health 0x000b 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 004 000 Old_age Always - 412323151968
190 Airflow_Temperature_Cel 0x0022 068 047 040 Old_age Always - 32 (Min/Max 30/37)
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 10
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 688
194 Temperature_Celsius 0x0022 032 053 000 Old_age Always - 32 (0 18 0 0 0)
195 Hardware_ECC_Recovered 0x001a 084 064 000 Old_age Always - 0
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 2
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 4953h+47m+48.684s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 21937064806
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 23319983319
 
Die 199 halte ich für unkritisch, wenn sie sich nicht ändert. Ich habe hier auch Platten mit z.B. einem konstanten Wert von 6, die überhaupt keine Probleme machen. Hast Du Probleme mit der Platte oder hast Du die SMART-Werte ohne konkreten Anlass überprüft?
 
Hast du mal die FARM-Werte geprüft?
 
Die sollten eigentlich 0 sein, beide.
 
Also Probleme habe ich mit der Platte jetzt keine feststellen können. Lese aber ab und an mal die Werte über den Aufgabenplaner aus. Und wie gesagt, scrutiny läuft bei mir auch als Container.

@ctrlaltdelete so hatte ich das auch in diesem Forum entnommen

@maxblank meinst du diese Werte?

=== Checking device: /dev/sata1 ===
Model Family: Seagate IronWolf Pro
Device Model: ST4000NE001-2MA101
Serial Number: WS24TGH7

SMART: 4993
FARM: 4993
HEAD: PASS (Max: 2 hrs, Min: 2 hrs, Factor Limit: 30, Actual Factor: 0.00)
RESULT: PASS
 
Jepp, passt. 👍
 
  • Like
Reaktionen: ctrlaltdelete
Ich habe jetzt mal meine andere Seagate Platte extern angestöpselt und ausgelesen. Allerdings ohne die Umrechnung.
Da ist die ID188 genauso. Scheint wohl normal zu sein bei Seagate?

=== START OF INFORMATION SECTION ===
Model Family: Iron Wolf PRO
Device Model: ST4000NE001-2MA101
Serial Number: WS24SXQL
LU WWN Device Id: 5 000c50 0e7517930
Firmware Version: EN01
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: Unknown(0x0fe0) (minor revision not indicated)
SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun May 25 12:35:03 2025 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Error_Rate 0x000f 082 064 044 Pre-fail Always - 153370481
3 Spin_Up_Time 0x0003 092 091 000 Pre-fail Always - 0
4 Start/Stop_Count 0x0032 100 100 020 Old_age Always - 602
5 Retired_Sectors_Count 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 073 060 045 Pre-fail Always - 20344733
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 1905
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Drive_Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 484
18 Read_Error_Rate_Self-Test 0x000b 100 100 050 Pre-fail Always - 0
187 Reported_Uncorrectables 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout_Count 0x0032 100 001 000 Old_age Always - 5437511566579
190 Airflow_Temperature 0x0022 073 050 040 Old_age Always - 27 (Min/Max 22/27)
192 Emergency_Retract_Counnt 0x0032 100 100 000 Old_age Always - 18
193 Load/Unload_Count 0x0032 100 100 000 Old_age Always - 663
194 Temperature 0x0022 027 050 000 Old_age Always - 27 (0 18 0 0 0)
195 ECC_On_the_Fly_Count 0x001a 082 064 000 Old_age Always - 153370481
197 Pending-Sparing_Count 0x0012 100 100 000 Old_age Always - 0
198 Uncorrectable_Sectors_Count 0x0010 100 100 000 Old_age Offline - 0
199 Ultra_DMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 2
240 Head_Flight_Hours 0x0000 100 253 000 Old_age Offline - 263328739886936
241 Lifetime_Writes_From_Host 0x0000 100 253 000 Old_age Offline - 17741654737
242 Lifetime_Reads_From_host 0x0000 100 253 000 Old_age Offline - 16036087962
 

Additional post fields

 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat