SMART-Werte auslesen und interpretieren

@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


Schreibe deine Antwort....

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