Skip to content

007revad/Asustor_SMART_info

Repository files navigation

Asustor SMART info

Badge Donate

Description

Show Asustor drive's smart health and attributes. Can also email you when important values change.

It also decodes Seagate HDD SMART values for attributes 1, 7, 195 and 240.

The script works in ADM 5 and ADM 4.

Requirements

This script needs bash installed in ADM. The easiest way to install bash is to install the Netdata app in App Central as it includes bash.

Install Netdata app

Leave Enable port fowarding UNTICKED

Download the script

  1. Download the latest version Source code (zip) from https://github.com/007revad/Asustor_SMART_info/releases
  2. Save the download zip file to a folder on the Asustory.
  3. Unzip the zip file.

Options when running the script

There are optional flags you can use when running the script:

  -a, --all             Show all SMART attributes
  -e, --email           Disable colored text in output scheduler emails
  -i, --increased       Only show important attributes that have increased
      --schedule        Schedule script to run at N hour each day.
                        Hour is 0 to 23. Or 'no' to delete schedule.
                        --schedule=3
                        --schedule=no
  -u, --update          Update the script to the latest version
  -h, --help            Show this help message
  -v, --version         Show the script version

To run the script via SSH

How to enable SSH in ADM

sudo -s /volume1/scripts/asustor_smart_info.sh

Note
Replace /volume1/scripts/ with the path to where the script is located.

To see all the SMART attributes run the script with the -a or --all option:

sudo -s /volume1/scripts/asustor_smart_info.sh --all

Note
The script automatically shows all SMART attributes for any drives that don't return "SMART test passed".

To see only important SMART attributes that have changed since you last ran the script run the script with the -i or --increased option:

sudo -s /volume1/scripts/asustor_smart_info.sh -i

To run the script automatically on a schedule

You can schedule to script to run once per day and send an email if any drive's important SMART values have changed.

To configure msmtp so the script can send emails edit the "Configuration Variables" at the top of msmtp_setup.sh then run:

sudo -s /volume1/scripts/msmtp_setup.sh

Then to set a schedule to run /volume1/scripts/asustor_smart_info.sh --increased at 3 AM each day you'd run the following via SSH:

sudo -s /volume1/scripts/asustor_smart_info.sh --increased --schedule=3

Sample email when a drive's important SMART attributes have changed

Troubleshooting

If the script won't run check the following:

  1. Make sure you download the zip file and unzipped it to a folder on your Asustor (not on your computer).
  2. If the path to the script contains any spaces you need to enclose the path/scriptname in double quotes:
    sudo -s "/volume1/my scripts/asustor_smart_info.sh"
  3. Make sure you unpacked the zip or rar file that you downloaded and are trying to run the asustor_smart_info.sh file.
  4. Set the script file as executable:
    sudo chmod +x "/volume1/scripts/asustor_smart_info.sh"

Screenshots

HDD, USB SSD and NVMe drive


Drives with issues in red

About

Show drive's smart health and attributes or email you when important values change.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages