Skip to content

Instantly share code, notes, and snippets.

@codykonior
Created March 3, 2024 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codykonior/41c27acde5c8eb2d0742809d1ae0fdad to your computer and use it in GitHub Desktop.
Save codykonior/41c27acde5c8eb2d0742809d1ae0fdad to your computer and use it in GitHub Desktop.
Script to compare Seagate EXOS X18 SMART attributes across disks on a Synology device
#/bin/sh
file="/tmp/exos_smartctl"
if [ -f "$file" ] ; then
rm "$file"
fi
sudo smartctl /dev/sata1 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata2 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata3 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata4 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata5 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata6 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata7 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
sudo smartctl /dev/sata8 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file"
cat "$file"
cat "$file" | grep "^ 1"
cat "$file" | grep "^ 3"
cat "$file" | grep "^ 4"
cat "$file" | grep "^ 5"
cat "$file" | grep "^ 7"
cat "$file" | grep "^ 9"
cat "$file" | grep "^ 10"
cat "$file" | grep "^ 12"
cat "$file" | grep "^ 18"
cat "$file" | grep "^187"
cat "$file" | grep "^188"
cat "$file" | grep "^190"
cat "$file" | grep "^192"
cat "$file" | grep "^193"
cat "$file" | grep "^194"
cat "$file" | grep "^197"
cat "$file" | grep "^198"
cat "$file" | grep "^199"
cat "$file" | grep "^200"
cat "$file" | grep "^240"
cat "$file" | grep "^241"
cat "$file" | grep "^242"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment