1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-14 11:43:15 +00:00
Go to file
2021-03-22 01:13:23 +01:00
.github/workflows add actions to gen hash 2021-01-25 15:20:59 +00:00
LICENSE Initial commit 2021-01-22 21:48:34 +00:00
README.md added note about contribution 2021-03-18 21:16:03 +01:00
stocheck.sh cleaner fancy output 2021-03-22 01:13:23 +01:00

stocheck

quick and dirty smart value checker

features:

  • sata/nvme support
  • show smart info and self-check results
    supports most common raid-controller brands (but not all models):
  • 3ware (series 6000, 7000, 8000, 9000 and 9750)
  • adaptec (smartraid/aacraid not yet implemented)
  • lsi/dell

contributing

As different drives have different arguments, there are always ones which im gonna miss out on. Please submit smart arguments that you think to be missing as issue or merge request.

usage

Usage: stocheck (options)
Options:
-h/--help -- show help
-u/--update -- update the script

running it on a remote machine:

running once:

ssh root@remote 'bash -s' < stocheck.sh

proper alias:

echo "function stocheck_remote { ssh root@"$"1 'bash -s' < ~/stocheck.sh; }" >> ~/.bashrc
echo "alias stocheck=stocheck_remote" >> ~/.bashrc

installation

  1. download the script:
wget https://git.byreqz.de/byreqz/stocheck/raw/branch/main/stocheck.sh
  1. run it with
bash stocheck.sh

or

chmod +x stockheck.sh && ./stocheck.sh
  1. optionally alias it
alias stocheck="~/stocheck.sh"

sample output

===  sata drive check: ===
-------------------------
1 Drives found
-------------------------
------------------- /dev/sda --------------------
=== START OF INFORMATION SECTION ===
Device Model:     INTEL XXXXXX
Serial Number:    XXXXXXXXXXXX
Firmware Version: LT2i
User Capacity:    240.057.409.536 bytes [240 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF SELF-ASSESSMENT TEST RESULT ===
SMART overall-health self-assessment test result: PASSED

=== START OF READ SMART DATA SECTION ===
  5 Reallocated_Sector_Ct   0x0032   100   100   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       1922
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       2115
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       1
194 Temperature_Celsius     0x0032   033   100   000    Old_age   Always       -       33 (Min/Max -20/75)
233 Media_Wearout_Indicator 0x0032   081   100   000    Old_age   Always       -       0
-------------------------------------------------