[TOOL] NVMe/SSD/HDD S.M.A.R.T Monitoring - Testing

edited June 2022 in General

Hello.
We started new project - NVMe/SSD/HDD S.M.A.R.T Monitoring.
Please anyone who wanna join testing, try it.

https://disk.lol/

Coming features:
Graphs
More to come as this is just testing...

How it works?
Each time you run smart.sh it will send the S.M.A.R.T data to our api.
Then the data is stored and get incremental id for your disk drive e.g.: https://disk.lol/view/f08f2f675d902874b98225386c12c4c45e4951183433353fe557e7c3bd319e28/_dev_sdd/1
You can also load latest S.M.A.R.T data of your disk drive by adding last at the end of url: https://disk.lol/view/f08f2f675d902874b98225386c12c4c45e4951183433353fe557e7c3bd319e28/_dev_sdd/last

Before downloading and running the script you can check the script hash:

wget -qO- https://disk.lol/smart.sh | md5sum | awk '{print $1}'
1cdbd6117452b520c94a83c31e4cee40

wget -qO- https://disk.lol/smart-test.sh | md5sum | awk '{print $1}'
6bc155992975d2a50046d0ad2cb6b7c4

Before downloading and running the script you can check if script verification was successful:

wget -q https://disk.lol/smart.sh | [[ "$(md5sum < smart.sh | awk '{print $1}')" = "1cdbd6117452b520c94a83c31e4cee40" ]] && echo "Verification of script was successful." || echo "Verification of script failed."

wget -q https://disk.lol/smart-test.sh | [[ "$(md5sum < smart-test.sh | awk '{print $1}')" = "6bc155992975d2a50046d0ad2cb6b7c4" ]] && echo "Verification of script was successful." || echo "Verification of script failed."

Before each run of script smart.sh you should also short test your disk(s):

wget -qO- https://disk.lol/smart-test.sh | sh

Downloading and running the script:

wget -qO- https://disk.lol/smart.sh | sh

Manually creating the script:
Copy and paste the code below into smart.sh
sh smart.sh
Code for smart.sh:

#!/bin/sh
for disk in $(smartctl --scan|cut -d ' ' -f1) ; do
echo "Generating S.M.A.R.T for disk: " $disk
smart=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
smartctl -a $disk -v 1,raw24/raw32 -v 7,raw24/raw32 > $smart
curl -F smart=@$smart https://disk.lol/api?disk=$disk
rm $smart
done
Tagged:

Comments

  • edited June 2022

    New additions:

    • You can only submit S.M.A.R.T data once per hour to our api.
    • Serial Number on view page is now showing as Hidden, so you do not need to worry about the serial number being show to public.
      • There is now a script (verify-and-run.sh) that will verify the current smart.sh hash, if its updated it will show you that you need to update it. This is mainly for those who want to download the smart.sh once, and you don´t trust https://disk.lol/smart.sh script to be downloaded each run.

    Btw we are on github now so you can post issues directly: https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring

  • This is cool. Thanks!

    Thanked by (1)xVPSx

    AmadexHosting ForumsWebshop: Guide to Start Selling Online • Free Debit Card & Online Bank Account 🤑

  • Posting data relies only on curl, why does the script also install wget?

    Maybe test for and use whichever is currently installed as the posting tool.

    Thanked by (1)xVPSx
  • edited June 2022

    @cochon That´s totally right. The wget is only used in script verify-and-run.sh, i will move the wget install there.

    But then the script is run as

    wget -qO- https://disk.lol/smart-test.sh | sh

    so you need wget to have installed anyway.

    There are many ways how to download the script.sh i know, but wget/curl is always handy.

  • Kinda surprised I haven't cooked my nvme yet despite running it out of spec for a year+

    Warning  Comp. Temperature Time:    0
    Critical Comp. Temperature Time:    197
    Temperature Sensor 1:               82 Celsius
    Temperature Sensor 2:               88 Celsius
    

    Maybe I should add a heatsink

  • NeoonNeoon OG
    edited June 2022

    @havoc said:
    Kinda surprised I haven't cooked my nvme yet despite running it out of spec for a year+

    Warning Comp. Temperature Time: 0
    Critical Comp. Temperature Time: 197
    Temperature Sensor 1: 82 Celsius
    Temperature Sensor 2: 88 Celsius

    Maybe I should add a heatsink

    Well, if you are still in warranty, they will check if you ran it out of spec, they could deny the repair/replacement.

  • @Neoon said:

    Well, if you are still in warranty, they will check if you ran it out of spec, they could deny the repair/replacement.

    Slightly sketchy fanless build so some level of temp risk was inevitable. Will be changing stuff though cause near 90 is a little too high even with some risk tolerance

  • If you have trust problems, the verify-and-run.sh is for you.

    Updated verify-and-run.sh

    Btw this is how verify-and-run.sh works - https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/blob/main/verify-and-run.sh-how.it.works

    verify-and-run.sh
    |
    |--> Check if wget is installed
    |    |
    |    |--> Yes - continue
    |    |--> No  - automatically install wget and continue
    |
    |--> Check & Verify verify-and-run.sh
         |        
         |-|--> If the hash of script.sh is the same as defined in script verify-and-run.sh
         |-|--> If the hashes on disk.lol and github.com sites are the same as defined in script verify-and-run.sh
         | |
         | |--> Verification of script was successful
         |      |
         |      |--> Check if script smart.sh exisits
         |           |
         |           |--> Yes
         |           |    |    
         |           |    |--> Now will run script smart.sh (smart.sh)
         |           |     
         |           |--> No
         |                |
         |            |--> Error: script smart.sh missing.
         |                     Please download manually smart.sh script (file must be named as smart.sh) - https://disk.lol/smart.sh
         |                 
         |
         |--> Verification of script failed
          |
          | --> Error: Verification of script failed - update your script.
                Please download manually smart.sh script - https://disk.lol/smart.sh
    

    From now on you can try it on Windows too.

    https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/blob/main/windows/README.md

    Download curl for windows:
    
    https://curl.se/windows/
    
    Download smartmontools (smartctl) for windows:
    
    https://builds.smartmontools.org/ (smartmontools-win32-setup-*.exe)
    
    Install smartmontools
    
    Copy c:\Program Files\smartmontools\bin\smartctl.exe to some new location, in our case it was x:\smart\
    
    Before you start creating scripts change according to your drive.
    - Output is written to sda.txt file.
    - smartctl.exe will generate S.M.A.R.T data for /dev/sda disk
    
    Create script smart.bat:
    
    %CD%\smartctl.exe -a /dev/sda > e:\smart\sda.txt
    
    --------------------
    
    Create script curl.bat:
    
    %CD%\curl\bin\curl.exe -F smart=@sda.txt "https://disk.lol/api?disk=/dev/sda/"
    pause
    
    --------------------
    
    Run scripts:
    
    smart.bat
    curl.bat
    
  • Little optimized our main site for speed load.
    Re-worked readme on github https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/blob/main/README.md

    Added "thanks section"
    Added "does it work section"
    Added "page speed tests"
    Added "archived links for site and scripts - wayback machine, archive.today"
    

    Finally made the wanted change: Don´t send serial number.

    From now on, when you send S.M.A.R.T data to our api, the serial number is removed, means we do not get the serial number in any possible way.

    https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/commit/aa21a77d5b1013714736fbc955007fbcb41ba782

  • Got a second domain:
    https://diskcheck.co/

    Scripts updates will follow. We will keep disk.lol too, its too short to not keep.

  • Some questions you may have. Why to use our tool.

    Because:

    • You can share with others the disk info
    • You can show much hours has been the disk run without any errors
    • You can show other when the disk is failing
    • You can show temperature chart
    • You also will have complete and original (without the serial number) s.m.a.r.t history of your disk(s) when sending s.m.a.r.t data to our api
    • Our script also checks the disks in hardware raid, which normally smartctl without scripting it first won´t do
    • And also you can get it working on windows, with the same things as above.
    • You contribute to our little community of disk fans who love s.m.a.r.t data, who love disks, who love to code things

    And finally and not lastly:

  • I like the idea of a "high score" table of power on hours! Sounds like fun.

    Thanked by (1)xVPSx

    Cheap dedis are my drug, and I'm too far gone to turn back.

    • Added new domain name - diskcheck.monster
    • Removed old domain name - disk.lol
    • Removed old domain name - diskcheck.co
Sign In or Register to comment.