/[sysadmin-cookbook]/recepies/smart/failure.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /recepies/smart/failure.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations)
Sat Oct 1 10:55:27 2011 UTC (12 years, 6 months ago) by dpavlin
File MIME type: application/x-sh
File size: 455 byte(s)
grep smart logs for failure and running smart tests
1 sed='s!/smart.! !'
2 egrep '(Raw_Read_Error_Rate|Reallocated_Sector_Ct|Seek_Error_Rate|Spin_Retry_Count|Reallocated_Event_Count|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count)' */smart.* | awk '{ if ( $10 > 0 ) print $1 " " $2 " " $10 }' | sed -e "$sed" -e 's/:[0-9][0-9]* / /' | sort | while read host serial status count ; do
3 echo $host $serial $status $count
4 egrep -A 1 '(failure|progress)' $host/smart.*$serial | sed -e "$sed"
5 done

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26