Skip to content

Instantly share code, notes, and snippets.

@dragonauta
Created February 4, 2016 11:05
Show Gist options
  • Save dragonauta/8d636f07613b35e2d14e to your computer and use it in GitHub Desktop.
Save dragonauta/8d636f07613b35e2d14e to your computer and use it in GitHub Desktop.
Smart values
#!/bin/bash
GREPVARS1='overall-health|ATTRIBUTE_NAME|Raw_Read_Error_Rate|Reallocated_Sector_Ct|Load_Retry_Count'
GREPVARS2='Power_On_Hours|Temperature_Celsius'
DEVICE=/dev/sda
sudo smartctl -AH $DEVICE | grep -E $GREPVARS1
sudo smartctl -A $DEVICE | grep -E $GREPVARS2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment